How to Shrink your Dynamics NAV SQL database or Transaction
Log
Step 1 Select and right click on the database --> Tasks -->Shrink --> Database
Step 2 Then it will show you Currently allocated space and
Available free space as below
Step 3
Press ok
Then it will process and reduce the database size as below
If both above didn’t work try below query, I can guaranty
this would work
--You can
find the logical name of the log file by using the following query:
SELECT
name FROM sys.master_files WHERE type_desc = 'LOG'
USE
NAV2018Production;
GO
--
Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE NAV2018Production
SET RECOVERY SIMPLE;
GO
-- Shrink
the truncated log file to 1 MB.
DBCC
SHRINKFILE (NAV2018Production_Log, 100);
GO
-- Reset
the database recovery model.
ALTER DATABASE NAV2018Production
SET RECOVERY FULL;
GO
No comments:
Post a Comment