SQL 2000 Database suspect

Source: Internet
Author: User

Workaround: In Sql-server, after creating a database with the same name (this is assumed to be test), stop the database and put the corrupted data.mdf and Test_log. The LDF overwrites the Data.mdf and Test_log in the new database directory that was just created. LDF, while removing test_log. LDF file; Start the database service and discover that the database name test has the word "suspect" behind it. It does not matter, open the SQL self-brought Query Analyzer, respectively, do the following: first step: exec sp_configure ' allow updates ', 1 RECONFIGURE with OVERRIDE/* Open the switch to modify the system table */Second step: Update sysdatabases set status=32768 where name= ' database name '/* * Setting Database Status */step three: DBCC rebuild_log (' Database name ', ' D:\database\Test_Log.LDF ')/* Rebuild LDF File */Fourth step: Update sysdatabases set status=0 where name= ' database name '/* Reset Database Status */Fifth step: Restore database name with RECOVERY/* restore Complex database */Sixth step: Exec sp_configure ' allow updates ', 0-RECONFIGURE with OVERRIDE//Turn off the switch to modify system tables */Follow this method, you should be able to repair the database normal access. If the problem persists, the stupidest way to do this is to create another database and export the data from each table in the original database (Test) to the new database table.


SQL 2000 Database suspect

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.