If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Backup Plan

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-01-04, 11:45
toby25 toby25 is offline
Registered User
 
Join Date: Sep 2003
Posts: 63
Backup Plan

We have db2 8.1 on AIX. Need to implement backup plan to recover the data up to the minute. I see therte are some options like LOGRETAIN, USEREXIT. Do I have to set both to yes or one of those to yes?
Why there r two different options?

Thanks in advance,
toby
Reply With Quote
  #2 (permalink)  
Old 01-01-04, 12:33
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
A database is recoverable with rollforward recovery if it is configured with either logretain set to RECOVERY or userexit set to ON.

Logretain indicates that log files necessary for rollforward recovery are to kept by DB2.

Specification of userexit indicates that a user exit program is to be used to archive and retrieve the log files.

Log files are archived when the database manager closes the log file. They are retrieved when the ROLLFORWARD utility needs to use them to restore a database.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 01-01-04, 14:20
toby25 toby25 is offline
Registered User
 
Join Date: Sep 2003
Posts: 63
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
Reply With Quote
  #4 (permalink)  
Old 01-01-04, 14:37
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
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
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #5 (permalink)  
Old 01-01-04, 19:46
toby25 toby25 is offline
Registered User
 
Join Date: Sep 2003
Posts: 63
Thanks...Will it be fine if we choose logretain ON and 'tar' backup the archive log directory?

Thanks,
toby
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On