HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

log_reuse_wait_desc says ACTIVE TRANSACTION but DBCC OPENTRAN reports nothing

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
reportsactivelog_reuse_wait_descbutdbccnothingtransactionsaysopentran

Problem

I'm using AdventureWorks database in Simple Recovery Model on SQL Server 2016 Ent, and I'm examining the active VLFs.

Running select * from sys.databases shows ACTIVE_TRANSACTION under log_reuse_wait_desc

but when I run dbcc opentran to figure out which session, i get "No Active Open Transactions"

There does seem to be a background task running, which prevents me from taking the database offline

Status           DBName           Command  
BACKGROUND    AdventureWorks     XTP_OFFLINE_CKPT


There is also a full-text catalog (which gets crawled regularly I guess?)

How do I find out what transaction is holding up my log VLFs ?

Solution

Because this is AdventureWorks and obviously not a production server, you're probably not going to get great answers here. I'd just restart the server. (Is that the right answer? No, but we're obviously talking about a development playground box here, and I wanna get you across the finish line quickly.)

If you really wanted to troubleshoot it, try sp_WhoIsActive:

sp_WhoIsActive @show_sleeping_spids = 1, @show_system_spids = 1, @show_own_spid = 1


Just because if you're getting started with transaction troubleshooting, I'd rather give you something easier to use than DBCC commands.

Code Snippets

sp_WhoIsActive @show_sleeping_spids = 1, @show_system_spids = 1, @show_own_spid = 1

Context

StackExchange Database Administrators Q#197144, answer score: 3

Revisions (0)

No revisions yet.