how to restore .bak file

  • i want to restore .bak file whhich my client has uploaded in httpdocs

    please help:crying:

  • The easy way is to use your GUI tools - SQL Server Management Studio (Express).

    Right click on the "Databases" tree node, drill down the popup menu to "Restore..." (the wording might be slightly different - I'm doing this from memory).

    On that screen that appears you can give your database a name. Then you'll need to add a "restore from..." location - it's going to be a FILE and then you can go choose your .bak file.

    Note that some of what I'm saying won't make sense unless you're looking at the screens as you are reading this.

    Back on the restore screen there's a second page you can look at - go to it. On here you'll see a listing of the database files. There will typically be two. Next to each file you can see where SQL Server is going to place the database files on your system. You should put them in a place that exists - the default restore locations are the locations of the files on the original SQL Server box that did the backup.

    Click OK and you're done.

    If you need to then get access to the DB for some apps you'll need to remap logins. If you're just using the DB as a system admin then you needn't worry about this step.

    The simple way to fix the logins is to ensure the same logins exist on your SQL Server box and then, open a new query window, switch to your DB, and type

    sp_change_users_login 'auto_fix', [the_user_name]

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply