Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am using DB2 9.7.

My LOGARCHMETH1 is set to VENDOR library. Example:

LOGARCHMETH1=VENDOR:/usr/openv/netbackup/bin/nbdb2.sl64

Is it possible to call the following backup command:

db2 backup database EAIBDB2I online \
    load '/usr/openv/netbackup/bin/nbdb2.sl64' \
    without prompting

if I change LOGARCHMETH1 to be on local disk and not on VENDOR library? How should LOGARCHMETH1be specified for that, and do I need other settings?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Yes you should be able to have backups and archived logs go to different places (ie, backups could go to your VENDOR tool and archived logs to disk).

To send archived logs to disk you can do one of two things:

The first would be to set LOGARCHMETH1 to DISK:

db2 "update db cfg using LOGARCHMETH1 'DISK:/dbarch/dblogs'"

The second method would be to have two forms of archiving logs. You can leave LOGARCHMETH1 to your VENDOR and set up LOGARCHMETH2 to point to DISK.

db2 "update db cfg using LOGARCHMETH2 'DISK:/dbarch/dblogs'"

I've not played with two forms of log archiving before, but I know that it is available.

In our company we write our backups and archived logs to disk and then sometime after midnight we have IBM's Tivoli Storage Manager (TSM) come along and take a file system snapshot so it will have a copy of the backups and archived logs. So then we have a backup of our backups. We probably could have worked in LOGARCHMETH2 in our company, but so far this has been simplest for us.

Just giving you ideas of what you can do. :)

share|improve this answer
    
Hi Chris thanks as always. I don't get the point of LOGARCHMETH2 paramter. What is it for? If both LOGARCHMETH are different from OFF logs will be written in both locations? Am I right? OK that wasn't what I thoght. By your answer you said I could have on different devices backups and archive logs so that is clear for me. Or I MUST(!!!) have LOGARCHMETH2 set if I want backup on different location (device)? thank you –  Dejan Feb 26 '13 at 15:04
    
Backups and archived logs are separate. So LOGARCHMETH1 & 2 have nothing to do with taking backups (outside of if you have circular then you can't taken onlines). They only have to do with archiving transaction logs. If 1 is set to OFF, then you have circular logging. If 1 is set to something else you immediately have archival logging. 2 is optional. If set to OFF then it is ignored. If set to something else, then you have two modes of archival logging going on. (think of it as having a backup of your archived logs). –  Chris Aldrich Feb 26 '13 at 17:34
    
So you don't need LOGARCHMETH2 set. But it is there in case you want it. And again, setting LOGARCHMETH1 and LOGARCHMETH2 just tells DB2 where you want to archive off your transaction logs. It does not tell DB2 where you want to take backups to. The two are independent in that respect (and should be from a best practice perspective). –  Chris Aldrich Feb 26 '13 at 17:35
    
Hello Chris it is totally clear now. If I may my last (unfortunately very begginer's) question-- is the maximum size of archive logs determined or not? On example if I turn archive logging on 1st January can there be a risk that I get out of storage space on local disk??? What steps should I take to prevent that I get out of storage if number of logs is just keep bigger and their number is also bigger and bigger? Thank you and sorry for this simple question –  Dejan Feb 27 '13 at 10:35
    
No problem! Us DB2 users stick together! The maximum size of archive logs is determined ultimately by the file system (or vendor system) that you choose to archive them to. The size is influence based on your LOGFILSIZ, LOGPRIMARY, and LOGSECOND parameters (ie, how big and how many logs you have), as well as your transaction volume. Unfortunately there is no magic bullet there either. You have to play with those settings to determine your optimal. I'll continue in my next comment. –  Chris Aldrich Feb 27 '13 at 13:39
show 10 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.