Monday, February 13, 2012

Auto-truncate log file

I have MSSQL server 2000.
I want that when log file is full, he would be truncated.
how to do this?
thanksSet the database to simple recovery mode.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"aa" <vaidas.gudas@.rst.lt> wrote in message news:eJc7j2qWFHA.132@.TK2MSFTNGP14.phx.gbl...
>I have MSSQL server 2000.
> I want that when log file is full, he would be truncated.
> how to do this?
> thanks
>|||To add to Tibor's response, the transaction log is truncated automatically
when the database is in the SIMPLE recovery model. This model is
appropriate when your recovery plan is to restore from database backup and
it is acceptable to lose database changes made since the backup.
In the FULL or BULK_LOGGED recovery model, you need to schedule regular
transaction log backups to provide forward recovery capability and keep the
log size reasonable. The log still needs to be sized to accommodate
activity between log backups. Although you can truncate the log even in the
FULL or BULK_LOGGED model with BACKUP LOG ... TRUNCATE_ONLY, this breaks the
log backup sequence and defeats the purpose of these recovery models.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"aa" <vaidas.gudas@.rst.lt> wrote in message
news:eJc7j2qWFHA.132@.TK2MSFTNGP14.phx.gbl...
>I have MSSQL server 2000.
> I want that when log file is full, he would be truncated.
> how to do this?
> thanks
>

No comments:

Post a Comment