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 |
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2010-05-04 : 16:21:41
|
I've a full backup and a log backup. i'm setting up mirroring. can you give me the script to restore with norecovery ?i'm missing at some where...RESTORE DATABASE mydb FROM DISK = N'G:\Mirror_copy\mydb.bak' RESTORE LOG mydb FROM DISK = N'G:\Mirror_copy\mydb.TRN' WITH NORECOVERYGOArnavEven you learn 1%, Learn it with 100% confidence. |
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2010-05-04 : 16:28:57
|
Got itRESTORE DATABASE mydb FROM DISK = N'G:\Mirror_copy\mydb.bak' WITH NORECOVERY ---i missed this WITH NORECOVERYRESTORE LOG mydb FROM DISK = N'G:\Mirror_copy\mydb.TRN' WITH NORECOVERYArnavEven you learn 1%, Learn it with 100% confidence. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
Kristen
Test
22859 Posts |
Posted - 2010-05-05 : 01:42:34
|
You can bring the database Live by restoring the final LOG backup using WITH RECOVERY or (something I didn't know for a long time, hence why I mention it ) you can just do:RESTORE DATABASE MyDatabaseName WITH RECOVERY without specifying any file to restore from |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2010-05-05 : 01:45:50
|
quote: Originally posted by Kristen You can bring the database Live by restoring the final LOG backup using WITH RECOVERY or (something I didn't know for a long time, hence why I mention it ) you can just do:RESTORE DATABASE MyDatabaseName WITH RECOVERY without specifying any file to restore from
You can even specify that command on the mirrored database after mirroring has been broken. We did this last week so that testing could be performed on the mirrored side. We were so happy that we didn't need to do backup/restore to get it available.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
Kristen
Test
22859 Posts |
Posted - 2010-05-05 : 02:10:38
|
I was grandly assuming that would be the case, but I've never used a mirrored server ... so good to have it confirmed by someone who has. I'm working on a job at the moment which will have a warm-standby (you'll be hearing from me no doubt!!) |
 |
|
|
|
|