View previous topic :: View next topic
|
Author |
Message |
krithikaj
New User
Joined: 10 Aug 2008 Posts: 45 Location: India
|
|
|
|
Hi,
I have a table that is partitioned in 90 parts based on DATE(as requirement is to have data for latest 3 months). The source data comes from a dataset. The data is loaded into the table using COBOL-DB2 program and an associated JCL using IBMLOAD everyday. The program checks for the partition number, increments the counter and creates the files that are needed for loading data. The counter is set to 1 (so that it points to PART 1), once partition number reaches 90.
My question here is, if the table is to be loaded for 91st partition (in general,every (90*n+1)th partition), how the data can be loaded as the partition key is different from that of the data in the file.
Eg: If PART 1--->'2008-06-18' and PART 90--->'2008-09-15'
When the data for 91st day i.e '2008-09-16' day needs to be loaded, the counter in the program will be rolled over to 1 so that it points PART 1, but the key still point to '2008-06-18'
Can someone help me solving this issue.
Thanks,
Krithika J |
|
Back to top |
|
|
Jerine_Cao Xiaojie
New User
Joined: 07 Sep 2008 Posts: 2 Location: Nanchang
|
|
|
|
hello,
I believe you can go for GDG. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Quote: |
but the key still point to '2008-06-18' |
and what key do you want ? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I believe you can go for GDG. |
Please explain how a gdg would address the posted question. I see no connection, but that may be because there is something i do not understand.
Quote: |
so that it points PART 1, but the key still point to '2008-06-18'
|
You may have to remove the "old key" and implement the "new key".
Have you talked with your dba? |
|
Back to top |
|
|
krithikaj
New User
Joined: 10 Aug 2008 Posts: 45 Location: India
|
|
|
|
Hi,
Even I do not understand the concept and advantage behind using GDG. Its all about the data, and particularly the DATE, that is important here.
Could you please let me know if it possible to re-create only one key for a table partition without deleting the data that other partitions already have.
For eg:
After 90 days, DATE on 1st PART (91st partition) to be changed to '2008-09-16' and leaving other partitions unaltered (along with the data).
Thanks,
KJ |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hi Krithi,
There is something called ROTATING PARTITIONS. Here is the link check it out....
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.admin/db2z_rotatepartitions.htm
Sushanth |
|
Back to top |
|
|
krithikaj
New User
Joined: 10 Aug 2008 Posts: 45 Location: India
|
|
|
|
Hi,
Actually the program that i was talking about is the ones which you referred to. I would like to know if it serves my requirement.
Thanks,
KJ |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Krithi,
You have 90 partitions for 90 days(3 months) and you are using counter in COBOL program to choose your partition to store data. After 90 days you don't need DAY 1. If this your requirement...
Rotating Partitions is what you are looking for.
Can i know what DB2 version your shop is using...
Before doing anything consult with your DBA,
Sushanth Bobby |
|
Back to top |
|
|
krithikaj
New User
Joined: 10 Aug 2008 Posts: 45 Location: India
|
|
|
|
I have V7 Db2 Version.
Thanks a lot for this information.
Regards,
KJ |
|
Back to top |
|
|
|