Solved

DB2 Archiving

Posted on 2011-03-14
6
800 Views
Last Modified: 2012-05-11
Hi,

We are running DB2 on IBM Mainframe Z/OS. We have records in a table which has approximately 5 million records per year and has been growing for the past 15 years.

We need to look into possible archiving solutions available within DB2. Can anyone suggest archiving solutions (for example, SQL Server has something called Partitioning) - is there anything that DB2 offers to archive tables, which does not involve modifying our software layer?

Kind Regards,
Asim
0
Comment
Question by:asim252
[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
6 Comments
 
LVL 45

Expert Comment

by:Kent Olsen
ID: 35128537
Hi Asim,

You can also partition in DB2.  (Note that to go from a normal table to a partitioned table will require "down time" with any DBMS.)

It would seem that partitioning by year may serve you well.  Then you can simply drop the oldest partition, or copy the data to an archive from that single partition.


Kent
0
 
LVL 37

Expert Comment

by:momi_sabag
ID: 35128794
db2 for zos has partitioning abilities which will make your life very easy
depending on the version you are running, switching to partitioning might require different steps, but the end result will be the same

which version are you running?
0
 
LVL 57

Expert Comment

by:giltjr
ID: 35129806
What version of DB2 for z/OS do you have?
0
Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

 

Author Comment

by:asim252
ID: 35140190
Hi,

We are using DB2 UDB for zOS V9.

Kind Regards,
0
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 500 total points
ID: 35145952
          Hi!

Use table partitioning which is supported in DB2 V.9 on z/OS.
Make sure you choose a good partitioning key and also consider that the indexes should be a superset of the partitioning key
so they can be partitioned as well.
DB2 and partitioning tables in V9 can then use partition pruning when executing sql statements meaning that DB2 reads only the table partitions/index partitions
that it needs to read and skips the rest. => Performance gain. :)

http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/topic/com.ibm.db29.doc.intro/db2z_typesofdb2tablespaces.htm

Hope this helps.

Regards,
   Tomas Helgi
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 35145985
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…

752 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