December 6, 2006 at 9:38 am
I set up a data dump (copy data from one server to another) that was a push from our development server to a backup server, that would inadvertently wipe out all of the table data in the development database on the development server before we were able to get backups scheduled (the dump happened first). Anyway, I can recover the original data file from a previous version of the database that was backed up using Acronis as a part of an imaging backup implemented by my web host. My question is, how do I go about restoring from that original mdf file? Can I just take the database off-line, and replace the mdf file, or do I make a backup of the original file and restore the backup? Any help would be greatly appreciated.
Thanks,
Jim
December 6, 2006 at 11:13 am
Detach the existing database using EM or sp_detachdb procedure and rename .mdf and .ldf files with suffix _old...
Copy the new .mdf file which you get from your backup server to the same location and attach it using EM or SP_ATTACHDB (if you don't have the .ldf file use sp_attach_single_file)...check BOL for more details on this procs...
MohammedU
Microsoft SQL Server MVP
December 6, 2006 at 11:26 am
Thanks much...
December 6, 2006 at 12:31 pm
Most important. Was the .mdf file copied when the database was offline? If not, it probably is unusable.
-SQLBill
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply