backup log Northwind with truncate_only go dbcc shrinkfile(Northwind) -- Logical file name of Master File go dbcc shrinkfile(Northwind_log) -- Logical file name of Log File go
MSSQL Snippet to Shrink Database files
Page 1 of 10 Replies - 1547 Views - Last Post: 15 July 2008 - 11:59 PM
#1
MSSQL Snippet to Shrink Database files
Posted 15 July 2008 - 11:59 PM
Description: If you are having the habit of extensive use of TEMP tables, which will leave free spaces or white spaces in your database, this code will help you remove those free spaces.This piece of code will shrink the database physical files, so that some disk space can be freed up.
Page 1 of 1