Solved

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

Posted on 2016-08-03
3
124 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
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…

691 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