http://www.sqlservercentral.com/blogs/steve_jones/2011/07/06/recovering-a-database/

Printed 2014/12/19 03:56PM

Recovering a Database

By Steve Jones, 2011/07/06

So you’re restored a database, restored a few logs, all with NORECOVERY as expected and realize there are no more logs. You see this in Management Studio and wonder what do to:

restoringdb

I’ve run a bunch of code, restoring lots of files, but I’m done.

RESTORE DATABASE db4 FROM DISK = 'db4_base.bak' WITH norecovery
RESTORE LOG db4 FROM DISK = 'db4_log1.trn' WITH norecovery
RESTORE LOG db4 FROM DISK = 'db4_log2.trn' WITH norecovery
RESTORE LOG db4 FROM DISK = 'db4_log3.trn' WITH norecovery
RESTORE LOG db4 FROM DISK = 'db4_log4.trn' WITH norecovery
....
RESTORE LOG db4 FROM DISK = 'db4_log42.trn' WITH norecovery

You don’t need another log to bring things online. This simple command will fix things:

RESTORE DATABASE db4 WITH recovery

That will return:

RESTORE DATABASE successfully processed 0 pages in 2.629 seconds (0.000 MB/sec).

and your database will be ready to go:

retoreddb


Filed under: Blog Tagged: Backup/Recovery, sql server, syndicated
Copyright © 2002-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.