Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: truncating snapshots

RE: truncating snapshots

From: Yadav, Shailesh <NDASY3_at_labor.state.ny.us>
Date: Thu, 20 Sep 2001 09:39:27 -0700
Message-ID: <F001.00393DF3.20010920095540@fatcity.com>

Henry,

  I think Anita's concerns are valid however in my experience of doing the refreshes like you plan to do I have not encountered the problem# 2. For problem# 1 what we do here is check the table you are going to populate the changes into for existance of that primary key. If found then update the record with new values else insert into the table.   The real catch here would be the deletions. Try to get the deletes before you do the refresh from the MLOG$xxx at the master site and then use those primary keys to perform the deletion.
  We have about 100 snapshots that are used to perform the aforementioned task for over a year without any problems. Let me know if you have any problem.

HTH,
Shailesh

-----Original Message-----
Sent: Tuesday, September 18, 2001 11:52 AM To: Multiple recipients of list ORACLE-L

Henry,

OK, I think I see what you're trying to accomplish. By truncating the snapshot between refreshes, the refresh is essentially populating the snapshot with only the changed rows from the master site.

Probably not supported, but I can't see that it would cause any real problems. The way the refresh mechanism works, the missing rows on the snapshot site shouldn't be a problem.

I see a couple of potential problems, however.

  1. The refresh will pull over all changed rows on the master site, in your case inserts AND updates. So if a row does get updated on the master site, then it will get refreshed to the snapshot site and your counts will be off since you'll be treating the update of an existing row as a newly inserted row.

It all depends on how critical the numbers are for the developers, because I can assure you it's only a matter of time before someone updates rows on a table that should only have inserts ;)

2. If a fast refresh fails this requires that the next refresh is a complete refresh, or the snapshot is recreated, so you will not have a way of getting just the set of changed rows. Your procedure will need to be able to detect this and perform the joins against the entire table again.

In the long run you're probably much better off developing your own trigger to populate another table or setting a flag, as you mentioned. Just because it works today doesn't mean that it will work in a newer release if they change the refresh mechanism.

HTH,


Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: A. Bardeen
  INET: abardeen1_at_yahoo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Yadav, Shailesh
  INET: NDASY3_at_labor.state.ny.us

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Sep 20 2001 - 11:39:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US