Tuesday, December 11, 2012

Terminating Database Restoring process

You may occasionally want to terminate an ongoing restoration process of your database backup.
In MS SQL 2008 R2, I don't find there's an easy way of doing so, currently I don't believe there's a cancel selection or w/e for this kind of purpose. So in this case, we'll have to do it manually and brutally.

To start with:
Stop your SQL Server Agent service

Then stop SQL Server Service.

Delete/rename the .Bak file you were using to restore your database.
Delete the log files or db files has been created from the restore

Start both services.

Relog into SSMS and check, you probably will still see 'DB(Restoring.....)'

To get rid of this, do a manual restore from Wizard, using any .bak file you want name it to 'DB'.

Once done, this should go away.

No comments:

Post a Comment