Restoring a database

  • Hi All,

    I have a bakup of a database available at some server and i need to have the same database on my local machine. How could i restore that .bak file on my local machine.

    Server: A

    Database: DB

    Backfile: BD.BAK

    My system: VR

    I need to use the DB>BAK on my local machine.

    Thanks,

    Varun

  • Hi Varun,

    Just copy the backup file to your local machine and run the following statement:

    restore database newdatabase

    from disk = '\' --path and filename of backup file

    --options if any go here

    You might need to use the "move" option if you don't have the same folder structure on your local machine as on the server. Check out restore command in BOL for more detail on the restore command.

    Hope that helps,

    Karl

  • you can use enterprise manager as well.

    right click the database. select restore and select backup file.

    make sure you change the mdf and ldf file path




    My Blog: http://dineshasanka.spaces.live.com/

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

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