SQL 2005 method of emptying the log

Source: Internet
Author: User

This tool can be cleaned in a clear.

Finally, a more dead method was adopted. Take the detach and then delete the log file and append it to generate a new log file.

Remember to make a good backup of the SQL before the operation, and if the data is lost West can not afford to do this.

The first step, of course, is to open Enterprise Manager.

Before separation, it is best to turn off the program that is connecting the database, such as IIS, or it will not be separated for a long while.

You can also choose to delete the link so that the separation will be faster.

We're going to locate the hard drive where the database is located.

In order to save, we can back up a copy of the Qq2.mdf, and then qq2_log.ldf this file to the name (200G file is really no place to back up).

And then we'll append the database.

Attach to the file just that MDF. Note that the following prompts the. ldf file is not found.

Whatever he was. Select. ldf this point to delete him.

And then make sure, Ha restore succeeded. The system automatically generates a new LDF file 504KB

See build everyone first use the above tool to clear, if not clear to use this dead method to delete the log

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.