Posts tonen met het label The Best way to Shrink Transaction Log file. Alle posts tonen
Posts tonen met het label The Best way to Shrink Transaction Log file. Alle posts tonen

maandag 22 december 2008

The Best way to Shrink Transaction Log file

http://www.mssqltips.com/tip.asp?tip=1225
===========================================

1): Backup the Log File to Disk.
2): Run the Following:

sp_helpdb 'TempDB'
exec sp_helpfile
DBCC OPENTRAN
DBCC SQLPERF(logspace)
DBCC LOGINFO
exec master..xp_fixeddrives

USE Warehouse
GO
DBCC SHRINKFILE(Warehouse_log,EMPTYFILE)
BACKUP LOG Warehouse WITH TRUNCATE_ONLY
DBCC SHRINKFILE(Warehouse_log, EMPTYFILE)