You will find a c sample of the userexit code in sqllib/samples/c , one each for archiving to tape, disk and tsm ... You will need to customize the program to your environment , build it and save the executable (named db2uext2.exe on windows and db2uext2 on unix platforms-with execute permission for the instance owner) to, preferabley, sqllib/misc .. Whenever a logfile is closed , db2 calls db2uext2 to archive the logs ...
Well, whether you use the userexit or not, is dependent on how critical the logs are ... I would prefer to go for userexit on production databases and just logretain on other systems ... Logretain retains the logs on the disks and any disk/system failure, you loose the logs as well ... It occupies disk space as well ...
HTH
sAthyaram
Quote:
Originally posted by toby25
Happy new year and thanks for all the help from this newgroup members. I am new to DB2 admin. Being SYBASE DBA in past and trying to adapt DB2.
Thanks for the clarification. So what is the general practice? Logretain ON or USEREXIT ON? or Both ON?
In what language do you write userexit prgram? Will it be .sh file ? How do you execute that program and frequency of the execution.
Regards,
toby
|