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
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
Hi Vikas,
ReplyDeleteAfter 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.
It was a great information. Thanks for sharing.
ReplyDeleteD365 Finance and Operations Training
D365 Finance Training
D365 Operations Training
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