Monday, 13 July 2015 00:00

How to check and repair MSSQL databases or tables

Rate this item
(0 votes)

Sometime happens with all to need to repair or check the consistency of the Microsoft SQL database.

Maybe you find the following error message on run your quesry’s:

SQL Server detected a logical consistency-based I/O error: incorrect checksum

For resolve this error can use the following commnads.

1. Select and check the database

use MyDbName; 
dbcc checkdb with data_purity;

In case if you receive some error in teh Database tables can you apply for each table the next sentence, of course first time need to set the database to SINGLE USER MODE.

ALTER DATABASE [MyDbName] SET SINGLE_USER WITH NO_WAIT

2. Repair the errored table:

use MyDbName;
dbcc checktable('myDbTableName', repair_allow_data_loss) 

3. After repair do you need to check again the database, and set to MULTI USER MODE

ALTER DATABASE [MyDbName] SET MULTI_USER WITH NO_WAIT

Reference: http://my.bergersoft.net/2009/10/23/how-to-check-and-repair-mssql-databases-or-tables/



 
Reference http://my.bergersoft.net/2009/10/23/how-to-check-and-repair-mssql-databases-or-tables/
Last modified on Thursday, 16 July 2015 18:25
Data Recovery Expert

Viktor S., Ph.D. (Electrical/Computer Engineering), was hired by DataRecoup, the international data recovery corporation, in 2012. Promoted to Engineering Senior Manager in 2010 and then to his current position, as C.I.O. of DataRecoup, in 2014. Responsible for the management of critical, high-priority RAID data recovery cases and the application of his expert, comprehensive knowledge in database data retrieval. He is also responsible for planning and implementing SEO/SEM and other internet-based marketing strategies. Currently, Viktor S., Ph.D., is focusing on the further development and expansion of DataRecoup’s major internet marketing campaign for their already successful proprietary software application “Data Recovery for Windows” (an application which he developed).

Media

More in this category: Repair a database »

Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.

Get Help Now

Thank you for contacting us.
Your Private Investigator will call you shortly.