Should I be regularly shrinking my DB or at least my log file?
- by Tom
My question is, should I be running one or both of the shrink command regularly,
DBCC SHRINKDATABASE
OR
DBCC SHRINKFILE
=============================
background
Sql Server: Database is 200 gigs, logs are 150 gigs.
running this command
SELECT name ,size/128.0 -
CAST(FILEPROPERTY(name, 'SpaceUsed') AS int) / 128.0
AS AvailableSpaceInMB FROM sys.database_files;`
produces this output..
MyDB: 159.812500 MB free
MyDB_Log: 149476.390625 MB free
So it seems there is some free space.
We backup transaction logs every hour, diff backup 5 nights a week, full backup the other 2 nights of the week.