SQL Server

June, 2017

  • 12 June

    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. …

January, 2017

October, 2016

  • 7 October

    Shrink SQL Database log file to One MB

    Every AX administrator should know how to shrink AX database logs from the SQL management studio. You can run below SQL command with respect to your AX database. ** Replace ‘AdventureWorks2012‘ with your database name USE AdventureWorks2012; GO /*Truncate the log by changing the database recovery model to SIMPLE*/ ALTER DATABASE AdventureWorks2012 SET …