Cannot shrink log file 2 (ABC_Log) because all logical log files are in use....
A small database ABC with data only 5 mb but its log is growing everyday around 20 mb. I want to shrink its size like for other databases on daily bases.
1. backup log ABC with truncate_only
2. DBCC SHRINKDATABASE (ABC, 10)
got following error:
<<Cannot shrink log file 2 (ABC_Log) because all logical log files are in use.>>
with no_log also tried but have the same error when dbcc shrinkdatabase..
any idea?
Actually, the log could be less than 10mb. After kill a process which was in 'sleep' mode for 10 hours, I was able to shrink the database log to only 2 mb.
The issue is at that time, there is no 'running' process at all while erroring on 'in use' with dbcc shrinkdatabase. There is no application service on that machine. ODBC is the only connection from application to it.
Thanks rmiao.
Is there a way to check a 'sleeping' processID to see if there is a un-committed transaction? Since dbcc inputbuffer(id) only tell us the last sql statement.
Bookmarks