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 |
|
robymon78
Starting Member
2 Posts |
Posted - 2011-09-07 : 04:44:58
|
| I need to Restore the Database with NoRecovery, when i did like this, Database is showing in Restore State, can't do anything for the Database. I am doing the Database Mirroring for this i need to Restore the DB with NoRecovery. |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-09-07 : 04:49:23
|
| Restore with NoRecovery means that the database is left in the restoring state and is unreadable. It's exactly what that option is supposed to do.--Gail ShawSQL Server MVP |
 |
|
|
robymon78
Starting Member
2 Posts |
Posted - 2011-09-07 : 05:10:09
|
| Following is the sql i used to restore the database, Please check this sql and tell me any mistake in this sql.RESTORE DATABASE Test FROM DISK = N'D:\DB\Test.bak' WITH FILE = 1, MOVE N'Test' TO N'D:\SQL_Files\Test.mdf', MOVE N'Test_log' TO N'D:\SQL_Files\Test_log.ldf', NORECOVERY,REPLACE, NOUNLOAD, STATS = 10GO |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2011-09-07 : 06:20:05
|
You can use NORECOVERY, and then the database is in a "restorING" state such that you can apply more backups to it - typically Log backups.When you are done, and want the database to be "live", you can do:RESTORE DATABASE Test WITH RECOVERY |
 |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-09-07 : 08:28:19
|
| Yes, that's perfectly correct and you need the database to be RESTORING to set up database mirroring--Gail ShawSQL Server MVP |
 |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-09-07 : 08:29:09
|
| Edit: Removed as no longer necessary |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2011-09-07 : 08:49:43
|
Edit: Removed as no longer clear |
 |
|
|
|
|
|
|
|