Recovering a DB

by alski 10. August 2008 20:16

While I already mentioned a link to recovering a DataBase without an easy backup, here are the previous commands I used to do it.

SELECT state_desc FROM sys.databases WHERE name = 'CommunityServerAlSki';
 
ALTER DATABASE CommunityServerAlSki  SET EMERGENCY;
ALTER DATABASE CommunityServerAlSki SET SINGLE_USER;
 
use CommunityServerAlSki
 
DBCC CHECKDB 
DBCC CHECKDB (CommunityServerAlSki, REPAIR_ALLOW_DATA_LOSS) WITH NO_INFOMSGS
 
ALTER DATABASE CommunityServerAlSki  SET Online;
ALTER DATABASE CommunityServerAlSki SET MULTI_USER;

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

SQL

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

RecentComments

Comment RSS