restore backup file

  • Hi all,

    I have a system admin, and asking a question about the backup. He want to restore a file from the backup tape (which include the database) and wonder if he can attach the database back into the server. I just ponder on this question, and would like someone input.

     

    thanks

  • Depend on how your database be backed up. If database was backed up by using T-SQL backup statement, you have to perform the restoration. If the database files (MDF and LDF) were backed when it was not opened, You can restore the MDF and LDF file and attach database back.

  • restore database dbname from disk='drive:\path\filename.ext'

    Can't use sp_attach_db unless the files we removed first with sp_detach_db.

     

     

  • You can restore a backup to a different database in EM, edit details and force overwrite, or in TSQL, in BOL. If you have the mdf & ldf files you can attach them as a different database if you wish .. (you don't have to have detached them previously)  If your tape backup does an on-line backup of the mdf & ldf files then I am not so sure on your chances of success unless the backup software has a surefire way of getting an active mdf backup complete. ( never used this method of backup )

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • I have successfully restored mdf files which were backed up from a running server, however, they database wasn't in use so the files weren't being accessed. I hasten to add I wasn't administering the database and this was my only available backup. Shortly afterwards I set up a backup job. It's generally not done to backup the mdf, ldf files from a running server, likely of successful restore is greatly reduced.

    Rick.

Viewing 5 posts - 1 through 4 (of 4 total)

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