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

Home -> Community -> Usenet -> c.d.o.server -> Re: Materialized view replication problem

Re: Materialized view replication problem

From: Bing Wu <bing_at_biop.ox.ac.uk>
Date: Thu, 14 Apr 2005 15:02:48 +0100
Message-ID: <425E7808.5090608@biop.ox.ac.uk>


Many thanks Frank to send the scripts over. Yes, I used a similar scripts from orafaq.com to setup things.

My problem here is how can I find out which invalid username is used for the job. How do I trace into this?

ta,

Bing

Frank van Bortel wrote:

>>
>>ORA-12012: error on auto execute of job 46
>>ORA-01017: invalid username/password; logon denied
>>ORA-06512: at "SYS.DBMS_SNAPSHOT", line 1883
>>ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2089
>>ORA-06512: at "SYS.DBMS_IREFRESH", line 683
>>ORA-06512: at "SYS.DBMS_REFRESH", line 195
>>
>>I use repadmin as the replication user and tested working under sqlplus.
>>Does the above job use different user instead? I would guess it was
>>'sys'. Any idea to change / fix this?
>>
>>Bing
>>

>
>
> Ah - trusted/untrusted model? Why else use a repadmin user?
> Do you plan to use templates for instantiation? Conflict
> resolution?
>
> Anyway - I cannot see why you have a password error in your
> job - could be on the remote side, could be explicit grants
> are missing.
> What I used to do (this is from 3 years back - runs on 8i):
> is according to doc id 118594.1 and 112075.1:
>
> /* Setting up a replication enviroment Doc Id 112075.1 */
>
> connect system/manager as sysdba
> /* create REPADMIN user */
> create user repadmin identified by repadmin
> default tablespace tools
> temporary tablespace temp;
> --
> /* Grant privileges to REPADMIN */
> grant connect, resource to repadmin;
> grant comment any table, lock any table to REPADMIN;
> --
> grant execute any procedure to REPADMIN;
>
> /* Granting admin privileges to REPADMIN */
>
> BEGIN
> DBMS_REPCAT_ADMIN.GRANT_ADMIN_ANY_SCHEMA(
> username => 'REPADMIN');
> END;
> /
> /*Connecting as user REPADMIN...*/
> connect repadmin/repadmin
>
> /* Scheduling purge */
>
> BEGIN
> DBMS_DEFER_SYS.SCHEDULE_PURGE(
> next_date => SYSDATE,
> interval => '/*2 Hr*/ sysdate + 2/24',
> delay_seconds => 0,
> rollback_segment => '');
> END;
> /
> /* Setting up Replication Snapshot */
> execute dbms_reputil.replication_off;
>
> /* connect as schema owner */
> connect scott/tiger
>
> create snapshot log on emp
> with primary key;
> --
> /***
> *** Setting up Replication ***
> ***/
> -- Set up Replication Group
> connect repadmin/repadmin
> --
> BEGIN
> DBMS_REPCAT.CREATE_MASTER_REPGROUP('MG');
> END;
> /
> /* Column Group Definition */
> -- maakt GEEN onderdeel uit van conflict
> -- resolution, maar normale setup.
> --
> -- Dit moet voor col group...
> /* Adding Master tables to Master Group */
> BEGIN
> DBMS_REPCAT.CREATE_MASTER_REPOBJECT('SCOTT','EMP','TABLE',
> gname => 'MG');
> END;
> /
> /***
> *** Setting up Replication ***
> ***/
> -- Set up Replication Group
> connect repadmin/repadmin
> --
> BEGIN
> DBMS_REPCAT.CREATE_MASTER_REPGROUP('MG');
> END;
> /
>
> /* Adding Master tables to Master Group */
> BEGIN
> DBMS_REPCAT.CREATE_MASTER_REPOBJECT('SCOTT','EMPLOYEE','TABLE',
> gname => 'MG');
> END;
> /
>
> commit;
>
> /* Adding Replication Support on Master Tables */
> BEGIN
> DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT('SCOTT','EMP','TABLE');
> END;
> /
> --
> /* Resume Activity */
> BEGIN
> DBMS_REPCAT.RESUME_MASTER_ACTIVITY('MG');
> END;
> /
> /* Template stuff - Doc Id 118594.1 */
> /****
> explicit grants for REPADMIN on master tables...
> ****/
> connect scott/tiger
> grant select on emp to REPADMIN;
>
Received on Thu Apr 14 2005 - 09:02:48 CDT

Original text of this message

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