Friday, March 30, 2012

Log is full?

What would be the best way to have the database run the following command when the logfile reaches a certain size?
BACKUP LOG kingjohnor WITH TRUNCATE_ONLY
GO
USE kingjohnor
DBCC SHRINKFILE(kingjohnor_log,1)
Thanks in advance for help : )If you are not going to back uo the transaction log file, then why not change your recovery mode to simple? This way the trans log will not grow at all - it will only hold uncommitted transactions.

No comments:

Post a Comment