Solved

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

Posted on 2016-08-03
3
103 Views
Last Modified: 2016-08-11
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?
0
Comment
Question by:Xetroximyn
  • 2
3 Comments
 
LVL 45

Accepted Solution

by:
Kent Olsen earned 500 total points
ID: 41741152
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
 

Author Comment

by:Xetroximyn
ID: 41746375
Thanks! What's the downside to Archive mode?
0
 
LVL 45

Assisted Solution

by:Kent Olsen
Kent Olsen earned 500 total points
ID: 41746568
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

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AWS RDS Backups? 3 51
constraint check 2 48
VMWare environment audit 8 65
ServiceCenter IR Query Expressions 1 40
APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question