use master
GO
Alter Database INACTIVECLIENTS2009SET SINGLE_USER With ROLLBACK IMMEDIATE
GO RESTORE DATABASE INACTIVECLIENTS2009FROM DISK = 'E:\DatabaseArchivesNotRestored\INACTIVECLIENTS2009_20110112_1053am.bak'WITH REPLACEGO
Alter Database INACTIVECLIENTS2009SET MULTI_USER With ROLLBACK IMMEDIATEGO USE INACTIVECLIENTS2009;GO
EXEC sp_updatestats
I was getting error "database cannot be restored because it is in use" this was resolved when I set the database to single_user mode
Alter Database INACTIVECLIENTS2009SET SINGLE_USER With ROLLBACK IMMEDIATE
Then after successfully restoring it I changed it to the multi user mode.
GO
No comments:
Post a Comment