Cloning: Exclude Table vs. Preserve Data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2018 10:00 AM
Can someone go into a bit of detail on Excluding Tables and Preserving Data in a clone. I think I had it a bit mixed up.
If you exclude a table, the documentation says: "Exclude a table to create an empty but usable table on the target instance."
So, if I exclude a table, it just creates the same table that was there with no data? And is that the table that existed in the lower instance before the clone, now blank. Or is it the table from PROD, blank (thinking if there are mismatches in fields between the two).
If you are preserving data on a lower instance, does that mean it keeps just that data, or does it mean it keeps that data AND adds the existing data from the PROD clone?
Let's say the scenario is this:
Table A in prod has record X.
Table A in dev has record Y.
I want Table A in dev with ONLY record Y after the clone, not Table A in dev with record X AND Y.
Let's say I want the freshest version of the table (which may be PROD) but I want the data from ONLY the lower instance that is being cloned.
Thanks!
- Labels:
-
Best Practices
-
Instance Configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2018 12:42 AM
I was having the same question, after further reading here is my understanding, Exclude Table will leave an empty table on the target instance (lower instance) and Preserve Data will preserve data which were on the target and NO data will be added from source instance.
"Preserved data is stored in a dynamically generated list on the target instance before the clone and restored on the target instance after the clone is complete."
I think the preserve data will work in your case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2018 08:08 AM
Yeah, I think you're right. I ended up opening a ticket with HI to get some answers, and they said essentially the same thing. I'll know if my set up works after our next clone and update this thread with the results.
From HI:
"The clone process first brings over all data, minus the excluded data. The preserved data is then applied on top of this cloned database."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2018 03:00 AM
We had just requested a clone and the behavior of Preserve Data (specially for ecc_agent table) wasn't quite what I expected. So what I understood was wrong, for your scenario e.g. to keep ONLY records in target instance both preserve data and exclude table needed to be defined as well as when request a clone "Exclude audit and log data" and "Exclude large attachment data" needs to be checked as True.
Here is explanation from Data Preservation
If you set a data preserver on a table where the source instance has more records than the target instance, the data preserved on the target instance also includes the additional records from the source instance.
For example, assume that the data preserver is already in place.
After the clone, the sys_temp table in the target instance contains 100 records.
- In the source instance, the sys_temp table contains 100 records.
- In the target instance, the sys_temp table contains 20 records.
To resolve this issue and to preserve only the records in the target table, create an exclude table record for the target table, in addition to setting the data preserver on the source table.
- The 20 records in the target sys_temp table are preserved successfully (per the data preserver specification).
- The source sys_temp table brings over the remaining 80 records to the target sys_temp table./li>
And here is the KB states that "Exclude audit and log data" and "Exclude large attachment data" needs to be checked as True.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 01:40 AM
great article!