Solved

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

Posted on 2016-08-03
3
68 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:
Kdo 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:Kdo
Kdo 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now