SQL Server R2 database operation prompts 9002 error "thing log is full" issue

Source: Internet
Author: User
Tags truncated

Transaction log Truncation

To prevent the database's transaction log from filling up, routine backups are critical. Under the simple recovery model, the log is automatically truncated when the database is backed up, and in the full recovery model, the log is truncated only after the transaction log has been backed up. However, the truncation process can sometimes occur with delays. For information about identifying and coping with various latency factors, see factors that may delay log truncation.

Attention
The BACKUP LOG with no_log and with TRUNCATE_ONLY option has been discontinued. If you must remove the log backup chain from the database when using the full or bulk-logged recovery model, switch to the simple recovery model. For more information, see Considerations for switching from the full or bulk-logged recovery model.

For more information about general log truncation, see transaction log truncation.

Http://msdn.microsoft.com/zh-cn/library/ms186865.aspx

Liyihongcug

In SQL SERVER 2008, BACKUP Log with TRUNCATE_ONLY is no longer supported, and to shrink the database log, you first need to truncate the file by setting the database recovery mode to simple.

--Modify the transaction log to the simple recovery model, in the simple recovery model, after backing up the database will automatically truncate the log, and in the full recovery model, only after you have backed up the transactions log to truncate the log
ALTER database name SET RECOVERY simple;
--Shrink Truncate log file 1MB
DBCC shrinkfile (database name _log, 1);
--Modify the transaction log to Full recovery mode
ALTER database name SET RECOVERY full;

SQL Server R2 database operation prompts 9002 error "thing log is full" issue

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.