Return-Path: <root@fatcity.cts.com>
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by naude.co.za (8.11.2/8.11.2) with SMTP id g89IQ6h27097
 for <oracle-l@naude.co.za>; Mon, 9 Sep 2002 14:26:06 -0400
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id LAA76545;
 Mon, 9 Sep 2002 11:24:28 -0700 (PDT)
Received: by fatcity.com (26-Feb-2001/v1.0g-b72/bab) via UUCP id 004CB238; Mon, 09 Sep 2002 09:53:26 -0800
Message-ID: <F001.004CB238.20020909095326@fatcity.com>
Date: Mon, 09 Sep 2002 09:53:26 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: Ray Stell <stellr@cns.vt.edu>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: Ray Stell <stellr@cns.vt.edu>
Subject: snapshot of a remote snapshot without pk
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 72; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


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@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@remote.db;

     EMPNO ENAME
---------- ----------
         1 stellr

SQL> create snapshot emp3_e6_local_snap refresh fast WITH ROWID as
        select * from EMP3_E6_SNAP@remote.db; 
               *
ERROR at line 2:
ORA-23413: table "STELLR"."EMP3_E6_SNAP" does not have a snapshot log
===============================================================
Ray Stell   stellr@vt.edu     (540) 231-4109     KE4TJC    28^D
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ray Stell
  INET: stellr@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@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).

