0 Replies - 1654 Views - Last Post: 15 July 2008 - 11:59 PM

#1 dineeshd   User is offline

  • member icon

Reputation: 39
  • View blog
  • Posts: 619
  • Joined: 30-June 08

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.
backup log Northwind with truncate_only
dbcc shrinkfile(Northwind) -- Logical file name of Master File
dbcc shrinkfile(Northwind_log) -- Logical file name of Log File

Is This A Good Question/Topic? 0
  • +

Page 1 of 1