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 > Help with User Exit !!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-29-04, 11:24
ronnier38930 ronnier38930 is offline
Registered User
 
Join Date: Aug 2003
Location: mississippi
Posts: 18
Help with User Exit !!

Hello,

I am currently running DB2 8.1.5 Workgroup Server Unlimited Edition. I have a small problem. I do weekly online backups of my DB but now the log files have reached over 5 GB and that is taking up too much backup tape to backup every day. Is there any way that after a online backup has been done DB2 will move the logs not needed for the roll forward process to another folder(possibly a mapped drive on the network)? I keep hearing something about a user exit command?


Any help would be appreciated

Thanks,

Ron
Reply With Quote
  #2 (permalink)  
Old 10-29-04, 11:35
bmujeeb bmujeeb is offline
Registered User
 
Join Date: Mar 2004
Posts: 448
The userexit program moves the inactive log files to another location
either to directory . You can use it with tsm to move the log files.

The steps are very as follow.Do as root.

1. Change the userexit db parameter.(Could be done last)
2. At the sqllib/samples/c library there are c programs db2uext2.* for archiving at different locations and tools.

3 Move them to a tmp directory and read the the files . how to compile them to your specific platform.

4. Copy the executibles to the adm/bin directory.

5. change its priviledges to executible.

Good luck

regards

Mujeeb
Reply With Quote
  #3 (permalink)  
Old 10-29-04, 11:45
ronnier38930 ronnier38930 is offline
Registered User
 
Join Date: Aug 2003
Location: mississippi
Posts: 18
Thanks for the reply....2 questions

1. what can I use for opening the files

2. What is tsm

thanks for your help in this matter
Reply With Quote
  #4 (permalink)  
Old 10-29-04, 12:13
bmujeeb bmujeeb is offline
Registered User
 
Join Date: Mar 2004
Posts: 448
These are c source(text) files, so any editor.
Tsm is trivoli storage manager, another product.
More information about userexit can be found at IBM site.

regards & thanks

Mujeeb
Reply With Quote
  #5 (permalink)  
Old 10-29-04, 13:11
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I don't think USEREXIT is going to help in this case: it only copies the archived log files as they are being generated; I don't think it can determine whether a certain log file is not needed for recovery.

I guess you could use the following approach: use "get db cfg for <database>" to determine the earliest log file needed for recovery (it advances after each backup) and then go and delete logs that are earlier than that file.

Since log files are numbered sequentially it shouldn't be too difficult to write a script to automate this process.
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