MSG 9002, Level A, state 4, line 4
The transaction log for database ' Test ' was full due to ' active_transaction '.
This is a test library error, because the log file of this library is set to not allow automatic growth, but in a large number of input data in the time to report this fault. This library has made the simple recovery model.
--The current log state of the database
Select Log_reuse_wait_desc from sys.databases
where name = ' Test '
Log_reuse_wait_desc
Active_transaction
--log Use Cases
DBCC SQLPERF (LOGSPACE)
Database Name Log Size (MB) log Space used (%) Status
Test 1.984375 118.30710
The most surprising thing is that its usage rate is 118%, and that extra 18% space for that?
--Take a look at its virtual log situation
DBCC Loginfo
-This shows that only one is active and the others are available. Another strange message.
In this state, the database is basically a read-only state.
Then how to solve this time, press troubleshoot a full Transaction log plus a log file on it. As the document says, there may also be this error when recovering a database. There are processing methods on that document.
The transaction log for database ' XXX ' was full due to ' active_transaction '.