Shrinking files issue, the following command fails.
USE *****
DBCC SHRINKFILE (*****_Log2, TRUNCATEONLY)
Unable to shrink log all the ususal suspects failed, message given:-
Cannot shrink log file 4 (*****_Log2) because all logical log files are in use.
(1 row(s) affected)
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
I even tried flushing dummy transactions through the log. Nothing worked however when we looked at the log_reuse_wait_desc field from select * from sys.databases we saw REPLICATION in this field indicating that replication was still running. We only have snapshot replication set up and it wasn’t/shouldn’t be running. I cleared this message by the following command:-
EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0, @time = 0, @reset = 1
The logs now shrink back without issue.