This discussion is archived
7 Replies Latest reply: Feb 6, 2013 10:40 AM by spajdy RSS

ORA-23313

Nuno Newbie
Currently Being Moderated
Hi

NEOSWEB is the schema where the tables to be replicated are
REPLICATOR is the schma used to perform the replication

I created the master Site replication environment

AS REPLICATOR

BEGIN
dbms_repcat.create_master_repgroup('cm_group');
END;


BEGIN
DBMS_REPCAT.CREATE_MASTER_REPOBJECT (
gname => 'CM_GROUP',
type => 'TABLE',
oname => 'TARGET_ACTIVITY',
sname => 'NEOSWEB',
use_existing_object => TRUE,
copy_rows => FALSE);
END;


BEGIN
DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT (
sname => 'NEOSWEB',
oname => 'TARGET_ACTIVITY',
type => 'TABLE',
min_communication => TRUE);
END;

BEGIN
DBMS_REPCAT.RESUME_MASTER_ACTIVITY (
gname => 'CM_GROUP');
END;

as a result:

select master, gname from ALL_REPGROUP;

Y CM_GROUP


------------------------------------------------

At remote Site

CREATE DATABASE LINK "DBL_SERVER"
CONNECT TO "REPLICATOR" IDENTIFIED BY VALUES '058C04EF7CE217A43F669EBF43A7303FA9F0E5E9BF66B52BB2' USING '(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(PORT=1521)
(HOST=192.168.0.4)
)
(CONNECT_DATA=(SERVICE_NAME=sificap)
)
)';

select * from neosweb.target_activity@dbl_server works...

Then

BEGIN
DBMS_REPCAT.CREATE_MVIEW_REPGROUP (
gname => 'CM_GROUP',
master => 'dbl_server',
propagation_mode => 'ASYNCHRONOUS');
END;

returns the following error:

Error report:
ORA-23313: o grupo de objectos "PUBLIC"."CM_GROUP" não tem um mestre em DBL_SERVER
ORA-06512: na "SYS.DBMS_SYS_ERROR", linha 105
ORA-06512: na "SYS.DBMS_REPCAT_SNA_UTL", linha 2460
ORA-06512: na "SYS.DBMS_REPCAT_SNA_UTL", linha 1783
ORA-06512: na "SYS.DBMS_REPCAT_SNA", linha 64
ORA-06512: na "SYS.DBMS_REPCAT", linha 1262
ORA-06512: na linha 2
23313. 00000 - "object group \"%s\".\"%s\" is not mastered at %s"
*Cause:    The group name is null, the group name is misspelled, the
invocation database is not a master, or the invocation database
does not believe the given database is a master.
*Action:   If the given group name was correct, connect to a current master
and retry the request, make the invocation database a master
with add_master_database, or use switch_mview_master if the
invocation database is a materialized view site.


Can someone point what I'm doing wrong?

Thank you for the help

Edited by: Nuno on Jan 30, 2013 6:03 AM
  • 1. Re: ORA-23313
    spajdy Pro
    Currently Being Moderated
    FInd who is owner of CM_GROUP on master site (in ALL_REPGROUP).
    Use fully qualified name of rep. group
    BEGIN
    DBMS_REPCAT.CREATE_MVIEW_REPGROUP (
    gname => '<owner>.CM_GROUP',
    master => 'dbl_server',
    propagation_mode => 'ASYNCHRONOUS');
    END;
    replace <owner> by real owner name (probably REPLICATOR)
  • 2. Re: ORA-23313
    Nuno Newbie
    Currently Being Moderated
    Owner is "PUBLIC"

    Should be REPLICATOR, correct? I need to recreate the group in the server, and "push" REPLICATOR as the owner?
  • 3. Re: ORA-23313
    spajdy Pro
    Currently Being Moderated
    I check my scripts I used some years ago and there is the my way:
    On master site>
    -- under SYS
    create user &&repusr identified by &&reppwd
    default tablespace &&rep_data
    temporary tablespace &&rep_tmp
    quota unlimited on &&rep_data
    quota unlimited on &&rep_index;
    begin
    dbms_repcat_admin.grant_admin_any_schema(  username => '&repusr');
    end;
    /
    begin
       dbms_defer_sys.register_propagator(username => '&repusr');
    end;                                                                                                                                                                                                                                                                                                                                                                                      / 
    
    CONN &repusr/&reppwd@&&lal
    begin
       dbms_defer_sys.schedule_purge(next_date => sysdate, interval => 'trunc(sysdate) + 7 + 17/24', delay_seconds => 0,rollback_segment => '');
    end;
    /
    -- then create master replication group add replication object, generate support and resume master group
    exec  dbms_repcat.create_master_repgroup(gname => ...,group_comment => ...);
    create snapshot log on ...  with primary key;
    exec dbms_repcat.create_master_repobject(
          gname => '"&2"',
          type => 'TABLE',
          oname => '"&1"',
          sname => '"&3"',
          use_existing_object => TRUE,
          copy_rows => TRUE);
    exec  dbms_repcat.generate_replication_support(
          sname => '"&3"',
          oname => '"&1"', 
          type => 'TABLE',
          min_communication => TRUE);
    BEGIN
    DBMS_REPCAT.RESUME_MASTER_ACTIVITY('&1');
    END;
    /
    On snapshot site>
    -- under SYS
    create user &&repusr identified by &&reppwd
    default tablespace &&rep_data
    temporary tablespace &&rep_tmp
    quota unlimited on &&rep_data
    quota unlimited on &&rep_index;
    begin
      dbms_repcat_admin.grant_admin_any_schema(username => '&repusr');
    end;
    /
    begin
      dbms_defer_sys.register_propagator(username => '&repusr'); 
    end;
    /
    begin
      dbms_repcat_admin.grant_snapadmin_proxy(username => '&repusr');
    end;
    /
    CONN &repusr/&reppwd@&&lal
    
    -- when you want to make update able snapshots you have to schedule jopb to propagate deferred transaction to master site
    exec  dbms_defer_sys.schedule_push(...);
    exec  dbms_defer_sys.schedule_purge(...);
    
    -- then create rep. group, snapshot, refresh group and add snapshot into refresh group
    exec dbms_repcat.create_snapshot_repgroup(gname => ...,master => ...,COMMENT => ...,propagation_mode => ...);
    exec dbms_refresh.make(list=>'',name => ...,next_date => SYSDATE,interval => ...,refresh_after_errors => TRUE);
    exec dbms_repcat.create_snapshot_repobject(sname =>...,
           oname =>...,gname =>...,TYPE  =>'SNAPSHOT',
           ddl_text =>'CREATE snapshot ...',
           gen_objs_owner  =>...);
    exec  dbms_refresh.ADD(name => ...,list => ...,lax => TRUE);
           COMMIT;
    It is only a sample. I show the sequence of commands I used.
    You have to fill up correct parameters that reflect your objects names.
  • 4. Re: ORA-23313
    Nuno Newbie
    Currently Being Moderated
    Thank you for the detailed help

    But my problem maintains...

    I created both a REPLICATOR user in the master and site.
    But whenever I do

    BEGIN
    DBMS_REPCAT.CREATE_MVIEW_REPGROUP (
    gname=> 'CM_GROUP',
    master=>'DBL_SERVER',
    comment=>'',
    propagation_mode=>'ASYNCHRONOUS',
    fname=>NULL,
    gowner=>'PUBLIC');
    END;

    I get

    Error report:
    ORA-23313: o grupo de objectos "PUBLIC"."CM_GROUP" não tem um mestre em DBL_SERVER
    ORA-06512: na "SYS.DBMS_SYS_ERROR", linha 105
    ORA-06512: na "SYS.DBMS_REPCAT_SNA_UTL", linha 2460
    ORA-06512: na "SYS.DBMS_REPCAT_SNA_UTL", linha 1783
    ORA-06512: na "SYS.DBMS_REPCAT_SNA", linha 64
    ORA-06512: na "SYS.DBMS_REPCAT", linha 1262
    ORA-06512: na linha 2
    23313. 00000 - "object group \"%s\".\"%s\" is not mastered at %s"
    *Cause:    The group name is null, the group name is misspelled, the
    invocation database is not a master, or the invocation database
    does not believe the given database is a master.
    *Action:   If the given group name was correct, connect to a current master
    and retry the request, make the invocation database a master
    with add_master_database, or use switch_mview_master if the
    invocation database is a materialized view site.


    If I do
    select * from all_repcat@dbl_server;

    I get
    "SNAME" "MASTER" "STATUS" "SCHEMA_COMMENT" "GNAME" "FNAME" "RPC_PROCESSING_DISABLED" "OWNER"
    "CM_GROUP" "Y" "NORMAL" "" "CM_GROUP" "" "N" "PUBLIC"

    which means the CM_GROUP DOES exist as a master at DBL_Server...

    I followed all the steps @Master...
    Is there any other way of finding if something is missing at the master environment?

    * The SNAME is the schema, shouldn't it be REPLICATOR? But if the group is created in REPLICATOR, why it pushes the "CM_GROUP" value???*

    Edited by: Nuno on Feb 6, 2013 7:50 AM
  • 5. Re: ORA-23313
    spajdy Pro
    Currently Being Moderated
    What is version of your DB ?
    select * from v$version;
    on master and snapshot site.
    And how those parameters are set:
    * global_names
    * db_domain
    * db_name
    * service_name
  • 6. Re: ORA-23313
    Nuno Newbie
    Currently Being Moderated
    Master
    Version
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    "CORE     11.2.0.1.0     Production"
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production

    global_names FALSE
    db_domain          NULL
    db_name sificap
    service_name sificap

    Site

    Version
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    "CORE     11.2.0.1.0     Production"
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production

    global_names FALSE
    db_domain          NULL
    db_name sificap
    service_name sificap


    Thank you for the help
  • 7. Re: ORA-23313
    spajdy Pro
    Currently Being Moderated
    Both of your DB have same name and global_names=FALSE. That could be the problem. For update able materialized views global_names=TRUE. Then each DB involved in replication must have unique name.
    So try to set global_names=TRUE and rename one of your DB.
    The DB link name must have name = db_name.db_domain of DB link point to.
    Drop already created master object and master group and then create it again.
    At last create snapshot group and snapshot in it.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points