Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

A typical scenario of usage of CLONE table.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Thu Feb 10, 2011 1:06 pm    Post subject: A typical scenario of usage of CLONE table.
Reply with quote

I know the attributes of clone table and how it works, but I cannot find a typical scenario of usage of CLONE table.
Can you experts provide me one?
when and under what circustances should CLONE tables be used?
How will CLONE tables provide us benefits?

Thanks.
Back to top
View user's profile Send private message

GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Thu Feb 10, 2011 1:25 pm    Post subject:
Reply with quote

1) Online processes fill a table, batch process empties it.
2) Information wharehouse tables are prepared/filled in clones.
during this process IW is still up
when the whole IW is ready, switch is made
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Fri Feb 11, 2011 8:52 am    Post subject:
Reply with quote

GuyC wrote:
1) Online processes fill a table, batch process empties it.
2) Information wharehouse tables are prepared/filled in clones.
during this process IW is still up
when the whole IW is ready, switch is made


Thanks, GuyC,

Is there a IBM article exaustively explaining these scenarios?
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Fri Feb 11, 2011 1:39 pm    Post subject:
Reply with quote

This briefly describes it : http://it.toolbox.com/blogs/db2zos/the-clones-are-coming-the-clones-are-coming-with-db2-9-15271
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Sat Feb 12, 2011 8:26 am    Post subject:
Reply with quote

Thanks, GuyC,
Although the link you provided is just a brief introduction to Clone table, which can be found in IBM redbooks, thanks all the same.

One question:
It is mentioned in the link that:
<blockquote>While you are accessing the base table, the clone can be loaded with new data. When the clone is ready, it has all the data you intend to load loaded, the base table and clone table are switch. The new SQL EXCHANGE statement is used to force the switch. Once the EXCHANGE completes, all references are now to the clone, which is now actually the real table. </blockquote>

I want to ask, if you UPDATED the base table before the SQL EXCHANGE, what will be the result? Will the UPDATED data exist both in the clone table and base table after the execution of SQL EXCHANGE&#65311;&#65311;&#65311;
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Mon Feb 14, 2011 2:25 pm    Post subject:
Reply with quote

no data that is inserted/loaded is only in clone table.
after exchange the clone is the base and the base becomes the clone. so that data exists in the base and not in the clone.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Mon Feb 14, 2011 5:19 pm    Post subject:
Reply with quote

then, how to keep sync between base table and clone table?
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Mon Feb 14, 2011 6:53 pm    Post subject:
Reply with quote

You don't. That's not what they are for.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Feb 15, 2011 12:52 am    Post subject:
Reply with quote

Hello,

This sounds like another solution (clone table) in search of a requirement.

What do you need to do? If you explain what requirement you are tyring to accomplish, someone will probably be able to provide some alternatives.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Tue Feb 15, 2011 6:00 am    Post subject:
Reply with quote

I mean, if there is no sync relationship between base table and clone table, "CLONE" just provides convenience no more than existing function called "INCURSOR LOAD", which should not be the fact, I suppose.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Feb 15, 2011 7:59 am    Post subject: Reply to: A typical scenario of usage of CLONE table.
Reply with quote

Hello,

If you have no actual requirement, your time will be better spent elsewhere. . .

Is there no "real work" to be done icon_confused.gif

d
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Tue Feb 15, 2011 2:02 pm    Post subject:
Reply with quote

I just want to prepare for urgent requirement...
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Tue Feb 15, 2011 2:20 pm    Post subject:
Reply with quote

I guess you didn't have to deal with many locking problems.
or with a set of tables establishing a consistent whole.

Loading a set of tables can be a lengthy process, exchanging clones isn't.

Cloning doesn't supply new functional solutions, only other ways to do the same faster and with better availability.
fe. There are sites which have views on one table that they change to another table and back. Cloning can do the same, but without invalidating packages.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Feb 15, 2011 8:29 pm    Post subject:
Reply with quote

Hello,

Quote:
I just want to prepare for urgent requirement...
Then post the requirement. . .

I have not yet seen a crisis situation where the resolution was to "send in the clones". . .
Back to top
View user's profile Send private message
singhju

New User


Joined: 01 Dec 2010
Posts: 25
Location: Gurgaon

PostPosted: Wed Feb 16, 2011 1:35 pm    Post subject:
Reply with quote

Hi,

Quote:
I know the attributes of clone table and how it works, but I cannot find a typical scenario of usage of CLONE table.
Can you experts provide me one?
when and under what circustances should CLONE tables be used?
How will CLONE tables provide us benefits?



I am working in a Banking application where during night batch we have to prepare the balances of the accounts for the next business day in files. Then we take an outage on the database and load the prepared data from files to corresponding tables.

So here we can use these clone tables. Without taking outage, we can load the clone table and then can switch it as base table. So we can make our application truely 24x7. However, we are not planning anything as such but I was just trying to give example for the usage of Clone table.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Wed Feb 16, 2011 1:48 pm    Post subject:
Reply with quote

I'm thinking of below question:

What if base table changes need to be applied to clone table?
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Wed Feb 16, 2011 2:14 pm    Post subject:
Reply with quote

again : not what clones is about.

Clones are not copies, they are identical structures !

If you're looking for replication or mirroring solutions, do not look at clones.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Wed Feb 16, 2011 2:19 pm    Post subject:
Reply with quote

Sorry, my mistake...
Thanks. GuyC
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Wed Feb 16, 2011 2:38 pm    Post subject:
Reply with quote

np, you're not the only one that makes it. I had to tell this to several people, that's why I come over short.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm
No new posts Updating online Db2 table kishpra DB2 3 Fri Aug 12, 2016 2:44 pm
No new posts Image Copy of a tablespace that conta... Robin Sulsona DB2 4 Thu Jun 02, 2016 1:47 am
No new posts Getting soc4 on internal table in cobol abdulrafi COBOL Programming 13 Fri May 06, 2016 3:39 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us