Solved

Oracle streams

Posted on 2014-11-04
3
255 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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

770 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