Database Log FIles
From NewHaven Software Wiki
Russ horton (Talk | contribs) (Created page with '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 databa…') |
Russ horton (Talk | contribs) |
||
Line 8: | Line 8: | ||
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. | 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) | + | *Stop the database service (SQL Anywhere) in Windows Services |
- | *Rename, compress, and/or move the .log file | + | *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 with the -f option to tell the database | + | *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: |
+ | |||
+ | [[file:DBsrv12.jpeg]] | ||
+ | |||
+ | No database server name is needed. | ||
+ | |||
*Start the database service | *Start the database service |
Revision as of 00:54, 31 May 2018
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.
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 database server name is needed.
- Start the database service