View previous topic :: View next topic
|
Author |
Message |
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
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 |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
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 |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
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 |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
Back to top |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
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??? |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
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 |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
then, how to keep sync between base table and clone table? |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
You don't. That's not what they are for. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you have no actual requirement, your time will be better spent elsewhere. . .
Is there no "real work" to be done
d |
|
Back to top |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
I just want to prepare for urgent requirement... |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
singhju
New User
Joined: 01 Dec 2010 Posts: 25 Location: Gurgaon
|
|
|
|
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 |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
I'm thinking of below question:
What if base table changes need to be applied to clone table? |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
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 |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
Sorry, my mistake...
Thanks. GuyC |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
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 |
|
|
|