Sysdatabaselog increases daily by 50 MB

This question has suggested answer(s)

Hello together,

we have in our Microsoft Dynamics AX 2009 the following problem:

  • We've made some settings in the sysdatabaselog for the processes we'd like to historicize
  • We only historicize processes that we have to retrace.
  • Nonetheless our Sysdatabaselog increases by 50 - 60 MB daily

Does anyone have a suggestion how we can reduce our Database log? (Outsource, shrink,...)

Maybe there's a functionality in the standard of AX?

 

I'm looking forward to your answers.

All Replies
  • Hi,

    U can create a job in SQL which executes daily after a certain interval performing shrink operation.

    Follow below link to create the job and set the script as below (change name of db):

    msdn.microsoft.com/.../ms187910.aspx

    USE [MicrosoftDynamicsAX]

    GO

    DBCC SHRINKFILE (N'MicrosoftDynamicsAX_log' , 0, TRUNCATEONLY)

    GO

    Mukesh Hirwani
    http://mukesh-ax.blogspot.in/ 

       

  • If you want to reduce the database log, as in the SQL Server Database log and not the table SysDatabaseLog in AX, then you need to make sure you do not break the "point-in-time" restore and transaction log chain.

    Shrinking the log without making sure the log is fully backed up will not help in the long run.

    If your restore plan is to have a "point-in-time" recovery, also known as Recovery Mode set to "Full", you need to do both Full backup of the database and the database log file. That is the only way to have SQL Server know it can safely reuse space in the log file. Any SQL Server technician should know how to setup a working SQL Server database in a controlled way, making sure the database log doesn't grow uncontrolled.

    Tommy Skaue | Dynamics AX Developer from Norway | http://yetanotherdynamicsaxblog.blogspot.no/ | www.axdata.no