开发者

sql2005 DB size is huge - how to truncate logs in production system?

i have a production DB that i need to periodically truncate logs in.

how can i get this done in a system that can have no down time and is a stand-alone SQL server?

i seem to remember there was a SQL command i can run... so i was thinking to set it up as a step in the b开发者_C百科ackup job so that after a backup is cut i will truncate the SQL logs.


You should not need to truncate logs.

If the logs are growing, then you probably have FULL recovery and no log backups. If this is OK, then you have a long running open transaction or similar but check backups first

if you have log backups, then do them more frequently. IMHO daily is pointless. We run every 15 minutes.. or are you mixing up full and log backups?

If the recovery model is SIMPLE and logs are growing, then the log needs to be that size (eg to allow for major index rebuild) or again you have a probably have a long running open transaction.

See MSDN And Paul Randal's blog

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜