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

Home -> Community -> Mailing Lists -> Oracle-L -> snapshot of a remote snapshot without pk

snapshot of a remote snapshot without pk

From: Ray Stell <stellr_at_cns.vt.edu>
Date: Mon, 09 Sep 2002 09:53:26 -0800
Message-ID: <F001.004CB238.20020909095326@fatcity.com>

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:



on remote machine:

SQL> CREATE TABLE EMP2
   (EMPNO NUMBER(4) NOT NULL,
    ENAME VARCHAR2(10)
   )
   PARTITION by range (empno)
     (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:



on remote machine:

CREATE TABLE EMP3
   (EMPNO NUMBER(4) NOT NULL,
    ENAME VARCHAR2(10)
   )
   PARTITION by range (empno)
     (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:



SQL> select * from EMP3_E6_SNAP_at_remote.db;

     EMPNO ENAME
---------- ----------

         1 stellr

SQL> create snapshot emp3_e6_local_snap refresh fast WITH ROWID as

        select * from EMP3_E6_SNAP_at_remote.db; 
               *

ERROR at line 2:
ORA-23413: table "STELLR"."EMP3_E6_SNAP" does not have a snapshot log

Ray Stell stellr_at_vt.edu (540) 231-4109 KE4TJC 28^D
-- 
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

Original text of this message

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