Showing posts with label SET RECOVERY FULL. Show all posts
Showing posts with label SET RECOVERY FULL. Show all posts

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

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++  Introduction In our previous posts, we explored what Copilot can do o...