Database Log FIles
From NewHaven Software Wiki
Your database log file (.log) is normally found in the same directory as your database (.db) file and serves several purposes that contribute to the use and safety of your database. You can configure your database to run without a log (not recommended) or with the log file running in another drive/directory but neither is commonly done.
Every connection and transaction sent from CMS to the database is stored in the log file. This aids in recovery should the database service become inaccessible mid-transaction (e.g. power outage) or corrupted (e.g. disk failure) where the log file could be used to reconstruct all of the transactions by applying it against the most recent backup. This log file can also be very useful in tracing down particularly obscure problems where reproduction steps for an issue cannot be found.
This log file can grow over time and for optimal performance you'll want to archive a copy off and start with a new empty log file. You may only need to do this once or twice a year or monitor it and perhaps archive if the log file becomes larger than your database, as one rather arbitrary rule of thumb. It's really up to you if/when to do it.
Archiving the Log File
This is an interactive log that is synchronized with your database so does require special handling. Here are the steps required to move and reset it, enabling you to start with a new 0 byte log file.
- Stop the database service (SQL Anywhere) in Windows Services
- Rename, compress, and/or move the .log file, ensuring that there is no longer a log file of the original name still in that directory
- Run dbsrv12.exe (found in the \SA12\Bin directory in the NewHaven Software share) with the -f option to tell the database as seen here:
No Server Name is needed.
Once run, you will briefly see a window pop up with quite a bit of scrolling text and then it will disappear (it's done.)
- Start the database service
If the service fails to start, you probably still have the old log file sitting in the directory not renamed/moved. When done properly, a new zero byte log file will be created when the service starts up.