Need to properly set USEREXIT and LOGARCHMETH1

2.1k Views Asked by At

Running DB2 version 9.7 on Windows Server. I'm new to DB2, but not to databases in general.

My underlying problem is this error in the Event Viewer:

ADM1848W Failed to archive log file "S0000880.LOG" to "USEREXIT" from "C:\DB2\NODE0000\SQL00003\SQLOGDIR\".

I don't want to user a USEREXIT program.

If I'm understanding what I've read correctly, the new method to specify a log archive method is to use LOGARCHMETH1. However some documentation (and some observed behavior) lead me to believe that it isn't that simple.

My current DB configuration is this:

> get db config for $my_db .... Log retain for recovery status = RECOVERY User exit for logging status = YES .... First log archive method (LOGARCHMETH1) = LOGRETAIN

I'm trying to turn off USEREXIT with this :

update db cfg for $my_db using userexit off

but with no effect.

How can I set my db to use LOGRETAIN but not USEREXIT ?

And a follow up, if I do get this set correctly, is a backup required to complete the change?

Thanks!

1

There are 1 best solutions below

0
On

Although I don't have a complete understanding of the USEREXIT still, I solved it by turning all logging off, then turning it back on with these steps (db2 commands):

To turn off:

connect to $db
update database configuration for $db using logretain off
db2stop
db2start

Then, turning on on:

connect to $db
update database configuration for $db using logretain on
db2stop
db2start
db2 backup database $db to <filename> without prompting

Note: a backup is NOT required when turning logging OFF but IS REQUIRED when turning logging ON.