pastebin - collaborative debugging tool
kpaste.net RSS


sql recovery
Posted by pi511 on Mon 3rd May 2010 19:39
raw | new post
modification of post by pi511 (view diff)

  1. 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:
  2.  
  3. EXEC SP_RESETSTATUS 'VeritabaniAdi';
  4.  
  5. ALTER DATABASE VeritabaniAdi SET EMERGENCY
  6.  
  7. DBCC CHECKDB('VeritabaniAdi')
  8.  
  9. ALTER DATABASE VeritabaniAdi SET SINGLE_USER WITH ROLLBACK IMMEDIATE
  10.  
  11. DBCC CHECKDB ('VeritabaniAdi', REPAIR_ALLOW_DATA_LOSS)
  12.  
  13. ALTER DATABASE VeritabaniAdi SET MULTI_USER
  14.  
  15. T-SQL Kod Kaynağı: CodeProject
  16.  
  17.  
  18. http://www.codeproject.com/KB/reporting-services/SQL_2005_Suspect_Database.aspx
  19.  
  20. EXEC sp_resetstatus 'yourDBname';
  21. ALTER DATABASE yourDBname SET EMERGENCY
  22. DBCC checkdb('yourDBname')
  23. ALTER DATABASE yourDBname SET SINGLE_USER WITH ROLLBACK IMMEDIATE
  24. DBCC CheckDB ('yourDBname', REPAIR_ALLOW_DATA_LOSS)
  25. 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