Delete Sql Server Logs in d365 fo x++

 USE AxDB;  

GO  

-- Truncate the log by changing the database recovery model to SIMPLE.  

ALTER DATABASE AxDB

SET RECOVERY SIMPLE;  

GO  

-- Shrink the truncated log file to 1 MB.  

DBCC SHRINKFILE (AxDBNew_log, 1);  

GO  

-- Reset the database recovery model.  

ALTER DATABASE AxDB

SET RECOVERY FULL;  

GO

Comments

Popular posts from this blog

Get Current Worker data in d365 fo x++

Table Level Event Handler in d365 fo x++