Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Just need a small hint re: mirroring tables
"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
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
SQL> spool off Received on Wed Jul 02 2003 - 08:36:53 CDT
![]() |
![]() |