Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Oracle : Redo / Undo for nologging table + Append + archivelog

$
0
0

I'm trying to replicate a table from an external Oracle DB to my system using a DB Link.

First i tried doing it using an mview but it caused alot of redo/undo(I did the same steps as below but it didn't work for some reason).

Next, I went on a different strategy and created a self implementation of an mview with a table.

  • Table was set as nologging when created. (verified it in dba_tables)
  • Index on table is set as nologging when created. (verified it in dba_indexes).
  • Database log_mode is set to ARCHIVELOG. (verified in v$database).

process of replication is being done like:

  1. Set index as unusable.
  2. Truncate table.
  3. Insert with append hint.(INSERT /*+append*/ into tbl_name SELECT * FROM v_tbl)
  4. Rebuild index nologging.

The code is written in a package which is being run with a scheduler_job on an interval.

v_tbl - a view that encapsulate the original external table structure(view is being built dynamically when compiled due to different sites external DB table names and columns) and give constant names for the columns(by the view columns aliases).

v_Tbl :

 SELECT column1 col1, 
        column1 col2 
 FROM ext_tbl@external_db;

When examining the archives using dbms_logmnr package I found a lot of redolog is being written on this table even though I'm using the append hint and no logging options for table and index.

In v$logmnr_contents view I see alot of rows for this table with operation = "DIRECT INSERT" and I can see all the data which was inserted in the redo/undo columns.

Is it related maybe to the DB link?

Am I doing anything else wrong?


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>