Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

DB2 Archiving

Posted on 2011-03-14
6
Medium Priority
?
831 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
6 Comments
 
LVL 46

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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:asim252
ID: 35140190
Hi,

We are using DB2 UDB for zOS V9.

Kind Regards,
0
 
LVL 26

Accepted Solution

by:
Tomas Helgi Johannsson earned 2000 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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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 (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Integration Management Part 2
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

926 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