MSSQL Shrink Database and Database Log Command

-- the database
USE YourDatabaseName;
GO

-- Shrink the data file
DBCC SHRINKDATABASE (YourDatabaseName);
GO

-- Shrink the log file
DBCC SHRINKFILE (YourLogFileName, 1); -- Change 'YourLogFileName' to the logical name of your log file
GO

 

By tajuzzaman

📍Kelabu Ventures 📍Aurora Cloud Works Sdn Bhd . A magician who writes code for computer, web, ios & android app . Servant of The One, Soldier of life