I killed the spid and ran manually exec dbo.usp_sqlwatch_internal_retention
it never finishes, dbcc opentrans gives the same thing with another spid
Oldest active transaction: SPID (server process ID): 58
UID (user ID) : -1
Name : DELETE
LSN : (65270:115008:1)
Start time : Sep 6 2022 4:45:42:950PM
SID : 0x010500000000000515000000b0ad624cea76d9b0107863e451040000
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
after 20 minutes I broke the job again. Can you please help on how to finish with this ‘ACTIVE_TRANSACTION’ sitting there whatever I do, I did a backup(DB is in simple mode), shrink…but nothing helped
The answer is that the retention job is likely to be deleting too much data at once. You can try changing batch options in the config table. Can’t remember from top of my head the exact item, but it should be self-explanatory when you see it.
This did not help, still getting the same alerts. What is strange, I do a full backup, I see unused space in Transaction Log around 90%, 30-45 minutes later I see unused space or 10%.
It is true that sqlwatch DB is in simple mode and I do regularly 1 full backup every Friday, can this be the root cause?