SQLServer AlwaysOn Database Cannot Shrink Log File
SQLServer AlwaysOn Database Cannot Shrink Log File
SQLServer - 2016
After the AlwaysOn database transaction log is truncated, the log file cannot be shrink, resulting in a large amount of disk space occupied by the log file.
Solution
If you have scheduled T-Log Backup on alwaysOn Database, After completion of T-Log Backup check the log_reuse_wait_desc of database using query
select name,log_reuse_wait_desc from sys.databases where name like 'Name Of Database'; |
If column log_reuse_wait_desc returns value NOTHING, immediately execute DBCC SHRINKFILE command and shrink log file without error.
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.