on 2015 Mar 20 2:07 PM
sql anywhere 11.0.1.2044.
I have a mobilink installation and my customer just called and said they have a 600m log file with a 90m database. I have the event setup like this:
CREATE EVENT LogLimit
TYPE GrowLog
WHERE event_condition( 'LogSize' ) > 10
HANDLER
BEGIN
IF EVENT_PARAMETER( 'NumActive' ) = 1 THEN
BACKUP DATABASE
DIRECTORY ''
TRANSACTION LOG ONLY
TRANSACTION LOG RENAME MATCH;
END IF;
END;
It appears like the event is not firing. This seems to be happening at more than one location. I have another customer setup the same way and it is working fine. Not sure what to look for???
Thanks.
You should run through a number of checks for this. The first thing to check is to see if the event is enabled or disabled. You can issue an "alter event .... enable" statement to re-enable it if it was disabled.
While the 'match' clause plays no role since you do not have a target backup directory that backup statement should be able to run as-is. That should only leave your event_condition and event_parameter checks.
It may be possible you have an earlier, stuck event blocking the action. You should be able to clear that by cycling the database server in that event. Something that could be easy to do to check this possibility out.
You can try manually triggering it to see if it runs ... you can also add message statements to log when the event fires and can even add checks for when numactive>1 (for example) to diagnose this possibility.
I do need to note that you are running the initial/first release of 11.0.1 and could be experiencing some issue around events not firing as expected. If you can you should check out one of the last EBFs that were posted.
Otherwise the syntax is working for me with a newer version. Is it possible the customer is just looking at an old copy of a transaction log that was never cleaned up after if it was located to another drive/directory?
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 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.