Thursday, February 16, 2012

backup

Hi, I backup db log in every 2 hours during day, and a full backup at
midnight, when is the best time to shrink database log file? before full
backup or after?Actually never is the best time. The log file got that large for a reason
and will most likely get that big again. Shrinking and growing is a waste
of resources. See here for more details:
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
Andrew J. Kelly SQL MVP
"js" <js@.someone@.hotmail.com> wrote in message
news:ujTS2giWFHA.616@.TK2MSFTNGP12.phx.gbl...
> Hi, I backup db log in every 2 hours during day, and a full backup at
> midnight, when is the best time to shrink database log file? before full
> backup or after?
>|||Hi
Never. If you log grows too big, then you need to do more regular
transaction log backups. Having autogrow on is an production environment is
a bad idea due to the time it can take to grow, possibly resulting in client
timeouts.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"js" <js@.someone@.hotmail.com> wrote in message
news:ujTS2giWFHA.616@.TK2MSFTNGP12.phx.gbl...
> Hi, I backup db log in every 2 hours during day, and a full backup at
> midnight, when is the best time to shrink database log file? before full
> backup or after?
>

No comments:

Post a Comment