SQL Server non-normal delete log file (LDF) recovery method

Source: Internet
Author: User
Tags log
server| Recovery

The transaction log file (LDF) is deleted when the SQL Server service is not started (SQL Server cannot delete the log file while it is working), in which case the corresponding database is flagged as suspect (suspend) status after the SQL service is started

According to the current results of my experiment, the recovery method is as follows:
1, separate the suspect database, you can use the sp_detach_db
2, attach the database, you can use sp_attach_single_file_db

SQL2K can be done directly under the EM environment, if it is SQL7, you need to complete the operation in QA.

I have succeeded in several experiments under SQL Server2000
If any of the unsuccessful, please inform the detailed steps and error information to facilitate the experiment again, better solution.

The above method applies to situations where the activity log does not exist in the deleted log file and will not succeed if there are active transactions.




Related Article

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.