Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Sql Server 2005 create a db from a backup

  • 25-03-2008 3:56pm
    #1
    Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭


    All I have is the .bak file, can this be used to create a new database? If so, how?


Comments

  • Closed Accounts Posts: 317 ✭✭tiptap




  • Registered Users, Registered Users 2 Posts: 981 ✭✭✭fasty


    There's probably a better way, but what I do is make a new blank database then follow the instructions linked by tiptap above. You might need to overwrite the existing database the first time at least.


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    tiptap wrote: »

    That's not what I want, I'm not restoring a database I'm creating one:

    http://msdn2.microsoft.com/en-us/library/ms186390.aspx


  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    Evil Phil wrote: »
    That's not what I want, I'm not restoring a database I'm creating one:

    http://msdn2.microsoft.com/en-us/library/ms186390.aspx
    That should do the job. If it's an entirely different server though, you'll need to check permissions and that - with the exception of dbo, the same users won't exist, which may screw with views and schemas.

    On SQL Server, you have to create the user to have server access and then you can link the server user to a database user. Database backups will create the database users, whether or not the corresponding server users exist.


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    You've probably done this by now, but if not when restoring also go into the options and choose to restore over existing database and also check the file paths that it's going to use, IIRC it will try to restore to the same path/filename as the original DB and not the new one you created, which may or may not be ok in your case but worth checking first.


  • Advertisement
Advertisement