Monday, 21 October 2019

HOW TO SHRINK DATABASE LOG SQL LOGS D365

HOW TO SHRINK DATABASE LOG SQL LOGS D365

Shrink database log.

USE DatabaseName;
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE DatabaseName
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (DatabaseFileLogName, 1);
GO
-- Reset the database recovery model.
ALTER DATABASE DatabaseName
SET RECOVERY FULL;
GO

Thanks,
Vikas Mehta

3 comments:

  1. Hi Vikas,

    After AX DB Log Shrink to 5 GB, AX D365 On-premises link is working but not able to run some forms and getting error related to SQL temp tables like(t_tablename) doesn't exist or doesn't have permission. Please suggest me the solution for this.

    Thanks,
    Palla Jagadeesh.

    ReplyDelete
  2. Excellent read, I just passed this onto a colleague who was doing a little research on that. And he actually bought me lunch because I found it for him smile So let me rephrase that. bank logs shop

    ReplyDelete

UX & Personalization: Next-Generation Workspace Experience

  UX & Personalization: Next-Generation Workspace Experience Section Content Title Build Your Dream Workspace: Advanced Personalization ...