Server Raid fault SqlServer data recovery instance

Source: Internet
Author: User
A Raid fault occurs on a server of a customer. After our efforts, the data is basically restored successfully. However, one of the SQL server log files (with the extension LDF) is seriously damaged and cannot be used, however, the data file corruption is not serious. We use the following operations to restore all the data. Create a database with the same name, and then stop sqlser.

A Raid fault occurs on a Server of a customer. After our efforts, the data is basically restored successfully. However, one of the SQL Server log files (with the extension LDF) is seriously damaged and cannot be used, however, the data file corruption is not serious. We use the following operations to restore all the data. First, create a database with the same name, and then stop the SQL ser.

A Raid fault occurs on a customer. After our efforts, the data is basically restored successfully, but one of the SQL Server log files (with the extension LDF) is seriously damaged and cannot be used, however, the data file corruption is not serious. We use the following operations to restore all the data.
  
Create a new database with the same name, stop the SQL server service, overwrite the new database file with the original data file, and restart the SQL server service. Open the Enterprise Manager, and the database is displayed as "Suspect". Execute the following statement in the query Analyzer:
  
USE MASTER
GO
SP_CONFIGURE 'Allow updates', 1 RECONFIGURE WITH OVERRIDE
GO
Update sysdatabases set status = 32768 where name = 'suspicious database name'
Go
Sp_dboption 'questionable database name', 'single user', 'true'
Go
Dbcc checkdb ('questionable database name ')
Go
Update sysdatabases set status = 28 where name = 'questionable database name'
Go
Sp_configure 'Allow updates', 0 reconfigure with override
Go
Sp_dboption 'questionable database name', 'single user', 'false' Go
  
After the execution, the database itself still has problems and still shows "questioning ". Create a new database, run the DTS export wizard, and import the data in the problematic database to the new database. Open the new database and retrieve all the data!

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.