How to Shrink database logs when databases are in availability group

One of my customers reported an issue, saying, log disk drive was almost full. When I checked, there are no jobs configured in SQL to shrink log files and databases are in the availability group. I had executed below mentioned steps to free up space on the log disk drive.

Since databases are in the high availability group and database recovery model is set as full, so I am unable to shrink complete log file size even specifying shrink file to 100MB. Anyhow, I got half of the free space on the drive, that helped me in resolving the application stop issue.

  1. Open SQL Server Management Studio (Run >> SSMS)
  2. Right click on the database >> Tasks >> Shrink >> FileTECHNOGUNS.com+shrink+log+avilability1
  3. In Shrink File form (See below screen):
  • Change File Type to Log
  • In the same form select Reorganize pages before releasing unused space, provide shrink log file size in MB’s and click ’Ok’.TECHNOGUNS.com+shrink+log+avilability2

If you have any questions/suggestions, please do comments below or write to me.
“Yours, Ravi Theja Madisetty”

Check Also

Microsoft E-Books absolutely free?!!

Eric Ligman (Director – Sales Excellence, Microsoft) posted web links on MSDN to download Microsoft …

Leave a Reply