pastebin - collaborative debugging tool
kpaste.net RSS


sql recovery
Posted by pi511 on Mon 3rd May 2010 19:38
raw | new post
view followups (newest first): sql recovery by pi511

  1.  
  2. Suspect durumuna düşmüş bir SQL Server veritabanınızı; veri kayıplarını da gözönüne alarak aşağıdaki komutları ard arda çalıştırarak kurtarabilirsiniz:
  3.  
  4. EXEC SP_RESETSTATUS 'VeritabaniAdi';
  5.  
  6. ALTER DATABASE VeritabaniAdi SET EMERGENCY
  7.  
  8. DBCC CHECKDB('VeritabaniAdi')
  9.  
  10. ALTER DATABASE VeritabaniAdi SET SINGLE_USER WITH ROLLBACK IMMEDIATE
  11.  
  12. DBCC CHECKDB ('VeritabaniAdi', REPAIR_ALLOW_DATA_LOSS)
  13.  
  14. ALTER DATABASE VeritabaniAdi SET MULTI_USER
  15.  
  16. T-SQL Kod Kaynağı: CodeProject
  17.  
  18.  
  19. http://www.codeproject.com/KB/reporting-services/SQL_2005_Suspect_Database.aspx
  20.  
  21. EXEC sp_resetstatus 'yourDBname';
  22. ALTER DATABASE yourDBname SET EMERGENCY
  23. DBCC checkdb('yourDBname')
  24. ALTER DATABASE yourDBname SET SINGLE_USER WITH ROLLBACK IMMEDIATE
  25. DBCC CheckDB ('yourDBname', REPAIR_ALLOW_DATA_LOSS)
  26. ALTER DATABASE yourDBname SET MULTI_USER

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at