Solved

Oracle streams

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JDeveloper 12c for 32 bit 4 71
return result by latest date - oracle query 21 70
null value 15 94
I want to write a query to populate column values based on another column 1 50
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
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.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

867 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

21 Experts available now in Live!

Get 1:1 Help Now