Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Vinnie881
Master Smack Fu Yak Hacker
1231 Posts |
Posted - 2007-10-31 : 17:15:29
|
| I am looking to create a new DB from a backup here's the codeRESTORE DATABASE SpProductionDBBak FROM DISK = 'C:\DellSqlBackup\SpProducitonDb10-29-2007.bak' WITH REPLACE, NORECOVERY, -- Use if more T/Logs to recover-- RECOVERY, -- Use if NO more T/Logs to recover-- STATS = 10 -- Show progress (every 10%) MOVE 'SpProductionDBNew_Data' TO 'C:\Program Files\Microsoft SQL Server\DataFiles\SpProductionDBBak.mdf', MOVE 'SpProductionDBNew_Log' TO 'C:\Program Files\Microsoft SQL Server\DataFiles\SpProductionDBBak_Log.ldf'GOIt tells me it successfully restored, but in SMS when I look at the Database in the object Explorer it saysSPProductionDBBak(Restoring...)any thoughts?is it possible that it's still working (20 minutes have passed) |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-10-31 : 17:17:10
|
| That's because you've specified the NORECOVERY option, which mean you want to keep restoring files. If you are finished with restoring, then specify RECOVERY instead.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
Vinnie881
Master Smack Fu Yak Hacker
1231 Posts |
Posted - 2007-11-01 : 00:24:44
|
| That's it, thanks! |
 |
|
|
|
|
|