Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> snapshot of a remote snapshot without pk
short question, log demo:
Since I can't make a snapshot of a remote partition (this is really what I wanted in the first place), I make a snapshot on the remote machine first and then snapshot the remote snapshot. This works if there is a PK on the remote original table, but not if I try to use rowid. Below is the demo, can anyone suggest a workaround?
demo that it works with pk:
(partition e6 values less than (6), partition e12 values less than (12), partition e18 values less than (maxvalue))/
Table created.
SQL> alter table emp2 add constraint emp_pk primary key(empno);
Table altered.
(insert some data)
create snapshot emp2_snap as select * from emp2 partition (e6);
SQL> create snapshot emp2_snap as select * from emp2 partition (e6);
Materialized view created.
SQL> select * from emp2_snap;
EMPNO ENAME
---------- ----------
1 stellr
on local machine:
SQL> create snapshot emp2_local_snap as select * from emp2_snap_at_remote.db;
Materialized view created.
SQL> select * from emp2_local_snap;
EMPNO ENAME
---------- ----------
1 stellr
demo of failure without pk:
(partition e6 values less than (6), partition e12 values less than (12), partition e18 values less than (maxvalue))/
(insert some data)
SQL> create snapshot log on emp3 with rowid; (can't create the snap without this log)
Materialized view log created.
create snapshot emp3_e6_snap refresh fast WITH ROWID as select * from emp3 partition (e6);
SQL> create snapshot emp3_e6_snap refresh fast WITH ROWID as select * from emp3 partition (e6);
Materialized view created.
SQL> select * from emp3_e6_snap;
EMPNO ENAME
---------- ----------
1 stellr
on local machine:
EMPNO ENAME
---------- ----------
1 stellr
SQL> create snapshot emp3_e6_local_snap refresh fast WITH ROWID as
select * from EMP3_E6_SNAP_at_remote.db; *
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Ray Stell INET: stellr_at_cns.vt.edu Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Mon Sep 09 2002 - 12:53:26 CDT