Re: Nologging and partition exchange

  • From: Tim Gorman <tim@xxxxxxxxx>
  • To: Paul.Baumgartel@xxxxxxx
  • Date: Fri, 04 Jun 2010 13:18:43 -0600

Title: Nologging and partition exchange
Paul,

Once NOLOGGING is used, then you accept the risk of losing data and having to restart in the event of media failure.  There is no way to eliminate this risk of data loss, so all you can do is minimize the risk of data loss using backups.  If the requirements to restart and re-run a load are too great, then the best approach is not to use NOLOGGING.  As the saying goes, "it depends" and additionally, "it is not as bad as it sounds".

Usually, I find an incremental backup scheduled on the tablespace(s) being loaded to be sufficient protection, but that's just me.  Bear in mind that the "old" data in the partition being exchanged (if any) has not changed status, and it should be recoverable.  It is only the "new" data newly exchanged into the partition that is at risk for that window of time.

As an example, I wrote a PL/SQL procedure that is used by a customer to perform migration to lower-tier storage, using exchange partition (of course).  Procedures in this package handle the entire migration life-cycle from higher-tier to lower-tier storage, including the final step of removing the tablespaces containing the now-redundant and no-longer-used "old" data located on higher-tier storage.  The package will not do this until it connects to the RMAN recovery catalog database to verify that newly-loaded (and compressed) data on lower-tier storage has been backed-up, and even then it schedules the DROP TABLESPACE command to be executed a further 5 days later, just to be certain.

So, this customer's backup process executes independently of this, and it polls periodically to detect whether UNRECOVERABLE/NOLOGGING activity has occurred since the last backup of a specific datafile.  If this is so, an incremental backup is scheduled and performed.  Independent of that, our package for tiered-storage migration is doing its work, using direct-path loads (and table compression), exchange partition, and NOLOGGING.  If media failure occurs, our data is protected until the newly-loaded (and compressed) data on lower-tier storage is backed up, by the fully-recoverable "old" set of data on higher-tier storage.  Once we determine that the newly-loaded data has been backed up, then (and only then) we consider dropping the older set of uncompressed data.

Hope this helps...

Tim Gorman
consultant -> Evergreen Database Technologies, Inc.
postal     => P.O. Box 630791, Highlands Ranch CO  80163-0791
website    => http://www.EvDBT.com/
email      => Tim@xxxxxxxxx
mobile     => +1-303-885-4526
fax        => +1-303-484-3608
Lost Data? => http://www.ora600.be/ for info about DUDE...


Paul.Baumgartel@xxxxxxx wrote:
So, let's say that we isolate all of the staging tables in a specific tablespace.  Would a regime of full (over the weekend, say) and incremental (after the staging load) backups of that tablespace be effective? 
 
If the above approach was not possible for some reason, and let's say that we didn't want to inject backup logic into the middle of the ETL process, an incremental backup of the tablespaces holding the partitioned tables after ETL is complete would be my next choice.
 

Paul Baumgartel
UBS AG
IB Accounting Solutions
400 Atlantic Street
Stamford, CT 06904

203.719.4368

paul.baumgartel@xxxxxxx
www.ubs.com

 


From: Mark W. Farnham [mailto:mwf@xxxxxxxx]
Sent: Friday, June 04, 2010 11:15 AM
To: tim@xxxxxxxxx; Baumgartel, Paul
Cc: oracle-l@xxxxxxxxxxxxx
Subject: RE: Nologging and partition exchange

And if… (meaning I agree completely with what is written so far…)

 

If you consider the partitioned object a live production object and the preparatory table loaded nologging to be a “staging” object, then preserving the recoverability of the staging object after loading but before the exchange is a practice to consider. When the source data for the “staging” table remains available at least through the preservation of the recoverability of the staging object, these leaves you with no point in time lacking a reasonable reprocessing workflow to follow when something goes bump. And at no time do you give access to users to an object that is not recoverable. While this does inject a lag between loading the staging object and making the contained data part of the production image, it does maintain the nologging advantage of minimizing the redo stream. Overall backing up the relevant incremental routinely produces less concurrency conflict amongst your hardware resources than the affect of injecting the extra redo.

 

This may or may not fit with your real world requirements, but it is a practice worth consideration.

 

 

mwf


From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Tim Gorman
Sent: Friday, June 04, 2010 9:54 AM
To: Paul.Baumgartel@xxxxxxx
Cc: oracle-l@xxxxxxxxxxxxx
Subject: Re: Nologging and partition exchange

 

Paul,

After any NOLOGGING operation, please perform an RMAN incremental level=1 backup as soon as possible.  Of course, level=0 or full is OK too, but the minimum is a level=1.  The time period between the completion of the load and completion of the backup is a window of risk of possible data loss in the event of media failure or corruption, and that window of risk is the tradeoff (i.e. speed vs recoverability) that must be consciously accepted using for the NOLOGGING operation.

Hope this helps...

Tim Gorman
consultant -> Evergreen Database Technologies, Inc.
postal     => P.O. Box 630791, Highlands Ranch CO  80163-0791
website    => http://www.EvDBT.com/
email      => Tim@xxxxxxxxx
mobile     => +1-303-885-4526
fax        => +1-303-484-3608
Lost Data? => http://www.ora600.be/ for info about DUDE...



Paul.Baumgartel@xxxxxxx wrote:

 

When a table is loaded with NOLOGGING and /*+ APPEND */ hint, then exchanged with a table partition, that partition remains unrecoverable, correct?

If you use this approach, how do you make the partition recoverable?

Paul Baumgartel
UBS AG
IB Accounting Solutions
400 Atlantic Street
Stamford, CT 06904

203.719.4368

paul.baumgartel@xxxxxxx
www.ubs.com

 

-- //www.freelists.org/webpage/oracle-l
-- //www.freelists.org/webpage/oracle-l

Other related posts: