Hi. On our customer's production databases, the backup process will truncate the log file. However, on their test database (which is not backed-up) the log file can become very large. How can I setup the test db so that the log file is periodically truncated, without implementing a backup process to get the job done? Thanks, Doug |
when starting the database use the follwing switch: Truncates the transaction log when a checkpoint is done. The -m database option must be specified after the database-file, and applies only to that database. dbsrv... my.db -m |
If you want to keep the log file under a specific size then you could create a GrowLog event that truncates the log: Here is an example taken from the docs - truncate the log when it becomes greater than 10MB: CREATE EVENT LogLimit TYPE GrowLog WHERE event_condition( 'LogSize' ) > 10 HANDLER BEGIN IF EVENT_PARAMETER( 'NumActive' ) = 1 THEN BACKUP DATABASE DIRECTORY 'c:\\logs' TRANSACTION LOG ONLY TRANSACTION LOG RENAME MATCH; END IF; END; |