Bringing a database out of Restoring state in SQL Server 2005

by Allan Svelmøe Hansen June 12, 2008 07:13

One of the many tasks of anybody who works more in depth with databases is the restoring of data.

Not being completely adept at this practice myself – mostly because it is rare that we administrate production databases – it is something I’m looking into at times.
Occasionally – I’ve seen databases being stuck in “Restoring” state. Basically without getting all to technical (because that’ll be a blog piece for another time), it is mostly because the Database is restored with the “NORECOVERY” clause, so it is ready to be rolled forward with transaction log backups.

So – a method of bringing a database back from restoring state is to run the script:
RESTORE DATABASE <DATABASE_NAME
WITH RECOVERY

This has worked for me so far anyways... :) 

Bookmark and Share DotnetKicks dotnetshoutout

Tags:

SQL

Powered by BlogEngine.NET 1.6.1.0
Theme by Mads Kristensen | Modified by Mooglegiant

About:
Allan Svelmøe Hansen

My real name is Allan Svelmøe Hansen.
I live in Denmark, where I work as a developer for hedal:kruse:brohus using SQL Server and the .NET framework since 2004.
My primary fields of expertise is back-end data integration, database design and optimization.


       View Allan Svelmøe Hansen's profile on LinkedIn     

Disclaimer

The opinions expressed herein are my own personal opinions and thoughts and does not represent my employers view in any way, nor are my results guaranteed for all situations.
Content is presented "as is", with no warranty.