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