Solved

Oracle streams

Posted on 2014-11-04
3
242 Views
Last Modified: 2014-11-05
Hi,

I need to replicate the data from oracle views (master_schema)to  tables in another schema(Rep_schema) (in the same database).
1) Can oracle streams be used for replicating data from oracle view to a oracle table?

Also if the data got deleted from base tables of oracle views (in master_schema) then the data should not get deleted in the tables of Rep_schema. Only update and inserts should replicate to the rep_schema.

2) Can this be achieved with  Fast refresh MV ? (I think we cannot. just I want to confirm)
3) Can this be achieved with oracle steams setup?


Thanks



.
0
Comment
Question by:GouthamAnand
3 Comments
 
LVL 34

Assisted Solution

by:johnsone
johnsone earned 100 total points
ID: 40421405
There are people here much more versed in streams than I, so I will not touch that.

As far as MVs go...

If the base of the MV is a view, then you wouldn't be able to use a fast refresh, it would have to be complete.  If you put the view query into the MV, then there is a possibility it could be done with a fast refresh, but it would probably take some changes.

A MV would also propagate the deletes.  There is no way around that in a MV.
0
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 400 total points
ID: 40421521
I use Strerams Replication but you have asked the question that is new territory for me.

Never tried replication to the same database but different schema.

Never tried replicating a view.  Not sure it is possible because of how streams tracks the changes to the base tables.

I've never done one-way replication with streams and I've also never set up my own DML handlers but what you are asking should be possible.

The online docs talk about this.

Direct and Custom Apply of LCRs
http://docs.oracle.com/cd/B28359_01/server.111/b28322/gen_rep.htm#i1010425

A user procedure can be used for any customized processing of LCRs. For example, if you want to skip DELETE operations for the hr.employees table at a certain destination database, then you can specify a DML handler for DELETE operations on this table to accomplish this goal.


All that said:  Why not go with triggers on the base tables?  It would likely be much easier since everything is in the same database.
0
 

Author Closing Comment

by:GouthamAnand
ID: 40423602
Thank you.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to take different types of Oracle backups using RMAN.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now