Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2016-08-03
3
Medium Priority
?
141 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 46

Accepted Solution

by:
Kent Olsen earned 2000 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 46

Assisted Solution

by:Kent Olsen
Kent Olsen earned 2000 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 Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

650 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