Sybase: Disable the transaction log

In some cases, you keep getting problems with a transaction log always filling up but do not need to be able to restore all data in a disaster recovery scenario (e.g. because you’re initially filling the database and if something goes wrong, you can just repeat the process or because it’s a test or development system and you do not care about the data).

Unfortunately, it is not possible to completely disable it. But you can make sure that the transaction log will be truncate on every checkpoint. The transaction log is then still there. It still costs you resources but it will be cleared at every checkpoint which will prevent it from filling up.

In order to have it truncated on checkpoint, use the following command:

exec master..sp_dboption mydb, 'trunc log on chkpt', true

Replace mydb by the name of the database on which you want to perform it.

To reenable the transaction log, just execute the following:

exec master..sp_dboption mydb, 'trunc log on chkpt', false

One thought on “Sybase: Disable the transaction log

Leave a Reply

Your email address will not be published. Required fields are marked *