Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Oracle streams

Posted on 2014-11-04
3
Medium Priority
?
281 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 400 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 1600 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
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 video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

704 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