February 21, 2008 at 4:50 am
Dear All,
I have a full database backup ( no diff's or trans logs) which I had restored on a test server through restore command using norecovery option instead of using the recovery option which had taken 4 hours as the database size is very huge. So is there any command which will give change the database from recovering to normal status.
Regards
Chandra Mohan N
[font="Verdana"]Thanks
Chandra Mohan[/font]
February 21, 2008 at 4:58 am
restore database databasename with recovery
Regards,
Andras
February 21, 2008 at 5:01 am
RESTORE DATABASE MyDB
WITH RECOVERY
John
February 21, 2008 at 9:55 am
Dear Friends,
Thanks for replying. I think my question is a bit confusing to you. Let me clear it out first.
Ex: I have a 500 gb database which takes 4 to 5 hours for restoration.
Instead of using the command 2 i had used command 1 which will make the database as recovering and it wont allow you to access the db. The option left is droping the database and again restoring the database using the command2 which will waste 4 to hours of time. So my question is if I had accidentally used command1 for a database which has no other backups (diff or trans). Is there any command which will allow the user to access the database without again restoring the db which will waste 4 to 5 hours of time.
Command1: restore database mydb from disk='d:\mydb_full_21022008' with norecovery
Command2: restore database mydb from disk='d:\mydb_full_21022008' with recovery
Regards
Chandra Mohan N
[font="Verdana"]Thanks
Chandra Mohan[/font]
February 21, 2008 at 9:56 am
Dear Friends,
Thanks for replying. I think my question is a bit confusing to you. Let me clear it out first.
Ex: I have a 500 gb database which takes 4 to 5 hours for restoration.
Instead of using the command 2 i had used command 1 which will make the database as recovering and it wont allow you to access the db. The option left is droping the database and again restoring the database using the command2 which will waste 4 to hours of time. So my question is if I had accidentally used command1 for a database which has no other backups (diff or trans). Is there any command which will allow the user to access the database without again restoring the db which will waste 4 to 5 hours of time.
Command1: restore database mydb from disk='d:\mydb_full_21022008' with norecovery
Command2: restore database mydb from disk='d:\mydb_full_21022008' with recovery
Regards
Chandra Mohan N
[font="Verdana"]Thanks
Chandra Mohan[/font]
February 21, 2008 at 9:58 am
Yes, there is. Don't use your command 2, but use the exact command that Andras and I both posted above. That should work for you... in seconds.
John
February 27, 2008 at 11:58 am
You have used command 1 and the database shows recovery use
alter database dbname with recovery to bring it online. you need not restore it again.
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
February 28, 2008 at 1:35 am
Sugesh Kumar (2/27/2008)
alter database dbname with recovery to bring it online. you need not restore it again.
That won't work... try parsing it. The correct syntax is the one that Andras and I posted. Although it uses the RESTORE command, it doesn't actually restore the database again. It just brings it into a recovered state.
John
February 28, 2008 at 8:54 am
Sugesh Kumar (2/27/2008)
alter database dbname with recovery
John I should have bolded this syntax so that to avoid confusion. I was meaning the same that you both were saying
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply