We often work with databases that have come off server environments (some have the Truncate Log at Checkpoint Option set on the Server). When we do, we are usually connecting to them stand alone as a local ODBC Source in Sybase SQL Central (opening the file rather than a server).
In version 9 of SqlAnywhere stopping and starting the database in this mode would truncate the log. In version 11 the log continues to grow.
How do we Truncate the log when we are connected as a local ODBC source?
asked 20 Oct '11, 18:46
When you connect to a database that is not currently running, it will be auto-started if it is configured to do so. I suspect that when you explicity start the database without auto-starting, that the command line parameters differ causing the change in behavior.
If you want to configure the auto-start to truncate the transaction log on checkpoint, you should be able to accomplish this by setting the appropriate -m switch in the DSN, or alternatively passing the START or DBS connection parameters when you connect to the database:
As an alternative, the transaction log can be manually truncated by issuing the appropriate backup statement.
BACKUP DATABASE DIRECTORY '' TRANSACTION LOG ONLY TRANSACTION LOG TRUNCATE;