Had some issues shrinking Transaction log. I thought this might be affected by availability Group function and taking your log backups on a secondary. But it seems that shrinking the Transaction log (dbcc shrinkfile) is not a Problem (you have to do it on the Primary for sure). Checking dbcc loginfo it Shows that there are some VLF (Virutal Log Files)  in use (Status=2) but it wasn't the last VLF checking free space with" dbcc sqlperf (logspace)" also Shows plenty of room to shrink. dbcc opentran also Shows no Transaction that is blocking. So changing recovery model to simple is not an Option in AVG. I did a logbackup on the secondary and then shrinking the t-log was successfull. So if shrink Fails you may be at the end of the Log (VLF) and the only remedy is to do a backup. There is a lot of stuff around dbcc loginfo so I wouldn't write anything obout that you can search for it in the web there is plenty of stuff about. One I should mention is you also can have a look on what is going on about your log with: select log_reuse_wait, log_reuse_wait _desc from sys.databases .

 

cheers,

Matthias