Home » SQL & PL/SQL » SQL & PL/SQL » How to create table replica dynamically (oracle 11g)
How to create table replica dynamically [message #599065] Tue, 22 October 2013 01:10 Go to next message
reenasharma
Messages: 5
Registered: December 2011
Location: pune
Junior Member
Hi ,

i need to create a replica of an existing table in same schema dynamically so as to reflect the modifications on replica table which has been done on primary table.this table we need to maintain as snapshot,like if a column is added or deleted then it should automatically be added or deleted on the replica table.

Help me how should i approach this.
icon3.gif  Re: How to create table replica dynamically [message #599066 is a reply to message #599065] Tue, 22 October 2013 01:15 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Create a synonym on the table.

Re: How to create table replica dynamically [message #599070 is a reply to message #599066] Tue, 22 October 2013 01:31 Go to previous messageGo to next message
reenasharma
Messages: 5
Registered: December 2011
Location: pune
Junior Member
Hey Michel thanks for the reply.

Correct me if m wrong but synonyms are used to provide alternative names for an object but here i need to create a snapshot of an existing table in the same schema and same environment.

Thanks
icon2.gif  Re: How to create table replica dynamically [message #599079 is a reply to message #599070] Tue, 22 October 2013 02:01 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

As you need to have a snapshot that is the EXACT replicate of the table, I call this a synonym.
If you don't agree, explain why a simple synonym does not fit your needs (I talk about functional needs not "I want a table").


Re: How to create table replica dynamically [message #599087 is a reply to message #599065] Tue, 22 October 2013 02:47 Go to previous message
John Watson
Messages: 8931
Registered: January 2010
Location: Global Village
Senior Member
If you have Enterprise Edition licences, you can replicate DML and/or DDL with Streams.
Previous Topic: Function that returns source tables from a query
Next Topic: ORA-06550 PLS-00201: identifier must be declared Issue.
Goto Forum:
  


Current Time: Fri Apr 26 01:39:38 CDT 2024