Tag: SQL Server transaction is full
Error description: The transaction log for 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 log (from Baidu Encyclopedia):
The transaction log is a file that is separate from the database file. It stores all changes made to the database and records all INSERT, UPDATE, delete, commit, fallback, and database schema changes. The transaction log is also known as a roll forward or redo log.
The transaction log is an important component of backup and recovery and is required to replicate data using SQL Remote or [replication agent].
By default, all databases use the transaction log. The use of the transaction log is optional, but you should always use it unless you are not using it for a special reason. Running a database with transaction logs provides stronger failsafe capabilities, better performance, and data replication capabilities.
The cause of the exception is thrown:
A. Uncommitted transactions
B. Very large business
C. Operations: DBCC Dbreindex and CREATE INDEX
D. When restoring from a transaction log backup
E. Client applications do not process all results
F. Query timed out before the transaction log completion extension, you receive a fake "Log full" error message
G. Non-replicated transactions
Workaround:
1. Free up disk space (for beginners);
2. Move the database to a fully-memory disk (same principle);
3. Emptying the log: DUMP TRANSACTION library name with no_log;
4. Truncate the transaction log: BACKUP log library name with no_log;
Encounter problems is our opportunity to progress, these are search from the Internet some of the solutions, hope can help you!
Why the transaction log is full in SQL Server and the workaround