Should I be regularly shrinking my DB or at least my log file?
Posted
by Tom
on Stack Overflow
See other posts from Stack Overflow
or by Tom
Published on 2010-04-23T16:19:19Z
Indexed on
2010/04/23
16:33 UTC
Read the original article
Hit count: 275
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.
© Stack Overflow or respective owner