The Cause and solution of the full transaction log in SQL Server

Source: Internet
Author: User

The Cause and solution of the full transaction log in SQL Server

Error Description: The transaction log of the database is full. To find out why the space in the log cannot be reused, see the log_reuse_wait_desc column in sys. databases.

First, introduce the concept of transaction logs (from Baidu encyclopedia ):

Transaction logs are files separated from database files. It stores all changes made to the database and records all insert, update, delete, commit, rollback, and database mode changes. Transaction logs are also called rollback logs or redo logs.

Transaction logs are an important component for backup and recovery. They are also required to use SQL Remote or [Copy proxy] To copy data.

By default, transaction logs are used for all databases. Transaction logs are optional. However, unless you do not use them for special reasons, you should always use them. Running a database with transaction logs can provide enhanced fault protection, better performance, and data replication.

Cause of exception:

A. uncommitted transactions

B. Very large transactions

C. Operation: dbcc dbreindex and CREATE INDEX

D. When restoring from the transaction log backup

E. Client applications do not process all results

F. query times out before the transaction Log is extended. you receive a false "Log Full" error message.

G. uncopied transactions

Solution:

1. Release disk space (applicable to cainiao );

2. Move the database to a disk with sufficient memory (same principle );

3. Clear logs: dump transaction database name WITH NO_LOG;

4. truncate transaction logs: backup log database name WITH NO_LOG;

Problems are the opportunities for us to make progress. These are some solutions for searching on the Internet and hope to help you!

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.