Tagged: shrink

0

DB procedure to shrink all databases

USE [master] GO /****** Object: StoredProcedure [dbo].[spShrinkAllDatabases] Script Date: 08/12/2011 15:40:15 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO — ============================================= — Author: Dan Sutton — Create date: 06/14/2011 — Description: Reindex all...






0

Shrink log size in sql database

To shrink the file size I use the following script: Use DBName Go exec sp_dboption DBName, ‘trunc. log on chkpt.’, true checkpoint DBCC SHRINKFILE (N’DBNameFileName, 0); exec sp_dboption DBName, ‘trunc. log on chkpt.’, false