Not a duplicate with:
Reason: My log is not big, but empty. It's big, but in use.
The Problem
I have a small database (100 MB) which gets hit with a lot of small transactional workloads throughout the day. I've watched the transaction log continue to grow despite seemingly understanding how to cap it. Clearly I'm missing something.
The database is in simple recovery model (I can't guarantee it wasn't in Full at one point when it was first created, but it has never been put under load in Full).
DBCC SQLPERF(Logspace)
says:
| Log Size (MB) | Log Space Used (%) | Status
--------------------------------------------
| 927.2422 | 94.72562 | 0
DBCC LOGINFO
says:
There are 39 rows (VLFs), all of which have a Status
of 2
.
DBCC opentran
says:
Oldest active transaction:
SPID: 51
Name: user_transaction
Start time : Mar 11 2019 7:27 PM
note: Given my server time, this transaction is about five minutes old.
I can't understand why every VLF is in use when my application only creates - at most - about a half dozen short-lived transactions, albeit very frequently.
I've tried killing the sole application process which connects to this database, but it didn't free up the transaction logs.
Workaround
I did a full backup just to scratch that itch and it freed up the entire log space... so... I don't know. I'll have to see if it grows excessively again.