is db2 really incapable of taking online backups without locking stuff up?

I hear db2 can't snapshot... we just have to live with the fact that during backup some oprations (like changes to tables) might hang.... Is this true?
XetroximynAsked:
Who is Participating?
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi Xetroximyn,

If DB2 is using circular logging (the default) then this is true.  The environment is "self contained" and backups can interfere with normal operations.

If DB2 is in archive logging mode, you should be able to take the backups while online.

  db2 connect to {mydb}
  db2 get db cfg |grep 'archive method'

If both values are 'OFF', you're in circular logging mode.

It's easy to change to archive mode, but you will need to cycle DB2 after you've changed the switches.


Good Luck!
Kent
0
 
XetroximynAuthor Commented:
Thanks! What's the downside to Archive mode?
0
 
Kent OlsenData Warehouse Architect / DBACommented:
Both modes have strengths and weaknesses.

Circular logging requires the least intervention, but since the logs are overwritten once the last log fills, the logs don't necessarily go back to the last backup.  If you can tolerate some data loss if a catastrophic event happens, this may be the best option.

Archive mode continues to assign (and fill) log files until the maximum number of log files (a tuning parameter) is reached.  It then assigns (and fills) secondary log files until the maximum number if secondary log files is reached.  When no more logs can be assigned, queries that would normally write to the log file fail with a "Log File Full" error.  If a catastrophic error occurs when DB2 IS in archive mode, the system can be restored to the last backup and rolled forward to where the failure occurred.  If you have little or no tolerance for data loss, this is probably the best option.

If you want more detail, here's a link to an old (2003) IBM page that describes both kinds of logging.  It might fill in some of the blanks for you better than I can in a couple of paragraphs.

  http://www.ibm.com/developerworks/data/library/techarticle/0301kline/0301kline.html


Good Luck,
Kent
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.