Solved

Oracle streams

Posted on 2014-11-04
3
269 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 35

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 77

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
make null the repeated levels 2 51
SQL query for highest sequence 4 75
replicate in oracle 13 45
oracle sql developer + 45 days from last day of month 2 22
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…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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 explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

752 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