I have many databases with full transaction logs. They are already in SIMPLE recovery model,
and I cannot add a new log or truncate the existing one, because the transaction log is full due to 'CHECKPOINT'
(Examining just one of the problematic databases)
I have a SQL Server 2012 SP1 database with a full transaction log.
This database has one data file (750MB) and one log file (850MB)
Compatibility level = SQL Server 2012 (110)
Recovery Model is Simple
Under Recovery Options, Page Verify=CHECKSUM and Target Recovery Time=0
I had 5G of free disk (which should have been enough), and I added more, so now I have 25G free.
My log file growth is set to: "By 10 percent, Limited to 2097152 MB "
(I can't change it - if I try I get an error because the transaction log is full)
I can't do a backup - get an error because the transaction log is full due to 'CHECKPOINT'
I can't add another log file - get an error because the transaction log is full due to 'CHECKPOINT'
Verifying that file#2 is my log file
SELECT file_id, name FROM sys.database_files;
I can't do a truncate only shrink successfully:
DBCC SHRINKFILE (2, TRUNCATEONLY);
- get an error because my log is out of space - with a cascade error that the transaction log is full due to 'CHECKPOINT'
DBCC CHECKDB mostly just gives errors because the transaction log is full due to 'CHECKPOINT'
I can't change the recovery model to full - get an error because the transaction log is full due to 'CHECKPOINT'
I can't change the recovery model to bulk-logged - get an error because the transaction log is full due to 'CHECKPOINT'
is_read_only=0, state=0, state_desc=ONLINE, is_in_standy=0
is_published=0, is_subscribed=0, is_merge_published=0, is_distributed=0, is_sync_with_backup=0
is_broker_enabled=1, log_reuse_wait=1, log_reuse_wait_desc=CHECKPOINT
I tried doing a manual CHECKPOINT (using the CHECKPOINT cmd in MgmtStudio) and got errors:
(1 row(s) affected)
Msg 5901, Level 16, State 1, Line 3
One or more recovery units belonging to database 'MYDATABASENAME' failed to generate a checkpoint. This is typically caused by lack of system resources such as disk or memory, or in some cases due to database corruption. Examine previous
entries in the error log for more detailed information on this failure.
Msg 9002, Level 17, State 1, Line 3
The transaction log for database 'MYDATABASENAME' is full due to 'CHECKPOINT'.
SELECT count(*) FROM fn_dblog (NULL, NULL);
That seems like a lot !?
My ERRORLOGs are full of errors about full transaction logs. I have many databases with this same issue - I've just focused on one, for testing.
gives me no open transactions
select * from sys.dm_tran_database_transactions where database_id = MYDBID
gives me 6 rows, of which 4 have null begin times
I tried using
select request_session_id, * from sys.dm_tran_locks where resource_database_id = MYDBID and resource_subtype = 'BULKOP_BACKUP_LOG'
and killing those sessions, but they always come back immediately