on 2011 Nov 18 11:35 AM
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.