Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Just need a small hint re: mirroring tables

Re: Just need a small hint re: mirroring tables

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Wed, 2 Jul 2003 14:36:53 +0100
Message-ID: <3f02dff6$0$19598$ed9e5944@reading.news.pipex.net>


"Paul Murphy" <pmurphy_at_scsinet.com> wrote in message news:uFAMa.30886$iZ3.21205_at_twister.nyroc.rr.com...
> I'm trying to get two pieces of software to share the same data, but
> they both have hardcoded into the executables the different
> schema.tablename. Because I can't modify the software, I have to create
> two duplicate tables of the same name in two separate schemas, but I
> need both executables using the same data, so I need them to be
> constantly synchronized. Maybe this is not a common problem and that's
> why I'm having so much trouble finding anything in books. Any ideas
> given the situation? Thanks! -Paul

Sybrands suggestion should fit the bill admirably.

SQL> create user u01 identified by u01;

User created.

SQL> create user u02 identified by u02;

User created.

SQL> grant app_user to u01,u02;

Grant succeeded.

SQL> alter user u01 default tablespace users temporary tablespace temp quota 100m on users;

User altered.

SQL> alter user u02 default tablespace users temporary tablespace temp quota 100m on users;

User altered.

SQL> conn u01/u01
Connected.
SQL> create table app_table(c1 char(20));

Table created.

SQL> grant all on app_table to u02;

Grant succeeded.

SQL> insert into app_table values('here is my data');

1 row created.

SQL> commit;

Commit complete.

SQL> conn u02/u02
Connected.
SQL> create synonym app_table for u01.app_table;

Synonym created.

SQL> select * from u02.app_table;

C1



here is my data

SQL> insert into u02.app_table values('here is u02 working');

1 row created.

SQL> commit;

Commit complete.

SQL> conn u01/u01
Connected.
SQL> select * from u01.app_table;

C1



here is my data
here is u02 working

SQL> spool off Received on Wed Jul 02 2003 - 08:36:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US