3 Replies Latest reply: Mar 4, 2013 11:23 AM by spajdy RSS

    Problem with creating replication object

    994375
      Hello,

      I have problem with procedure:
      BEGIN
        DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
          gname => 'groupCracow',
          oname => 'provinces',
          type => 'TABLE',
          sname => 'hr',
          use_existing_object => true,
          copy_rows => false);
      END;
      /
      After typing this nothing happens (no ora- error) in sqlplus, there is no output. Same situation happens when i use SQL Developer.

      I think, user I have created have every requisite privilege. Output from sqlplus:
      PRIVILEGE
      ----------------------------------------
      CREATE SESSION
      ALTER SESSION
      UNLIMITED TABLESPACE
      CREATE ANY TABLE
      ALTER ANY TABLE
      DROP ANY TABLE
      LOCK ANY TABLE
      COMMENT ANY TABLE
      SELECT ANY TABLE
      INSERT ANY TABLE
      UPDATE ANY TABLE
      
      PRIVILEGE
      ----------------------------------------
      DELETE ANY TABLE
      CREATE ANY CLUSTER
      ALTER ANY CLUSTER
      DROP ANY CLUSTER
      CREATE ANY INDEX
      ALTER ANY INDEX
      DROP ANY INDEX
      CREATE ANY SYNONYM
      DROP ANY SYNONYM
      CREATE PUBLIC SYNONYM
      DROP PUBLIC SYNONYM
      
      PRIVILEGE
      ----------------------------------------
      CREATE ANY VIEW
      DROP ANY VIEW
      CREATE ANY SEQUENCE
      ALTER ANY SEQUENCE
      DROP ANY SEQUENCE
      CREATE DATABASE LINK
      CREATE PROCEDURE
      CREATE ANY PROCEDURE
      ALTER ANY PROCEDURE
      DROP ANY PROCEDURE
      EXECUTE ANY PROCEDURE
      
      PRIVILEGE
      ----------------------------------------
      CREATE ANY TRIGGER
      ALTER ANY TRIGGER
      DROP ANY TRIGGER
      CREATE ANY MATERIALIZED VIEW
      ALTER ANY MATERIALIZED VIEW
      DROP ANY MATERIALIZED VIEW
      CREATE ANY TYPE
      ALTER ANY TYPE
      DROP ANY TYPE
      CREATE ANY OPERATOR
      DROP ANY OPERATOR
      
      PRIVILEGE
      ----------------------------------------
      CREATE ANY INDEXTYPE
      DROP ANY INDEXTYPE
      SELECT ANY DICTIONARY
      
      47 wierszy zosta│o wybranych.
      SQL> select gname, master, status from DBA_REPGROUP;
      
      GNAME                          M STATUS
      ------------------------------ - ---------
      GROUPCRACOW                    Y QUIESCED
      Oracle Database 11g, enterprise version.
      Windows 7 - 64 bit.

      Any ideas?

      Regards, Damian
        • 1. Re: Problem with creating replication object
          spajdy
          When PL/SQL block complete successfully then you are done.
          Check dba_repobject view to see your object is there.
          • 2. Re: Problem with creating replication object
            994375
            Object isn`t there:
            SQL> select oname, type, sname generation_status, min_communication from DBA_REP
            OBJECT where gname='groupCracow';
            
            nie wybrano ┐adnych wierszy (didn`t select any rows)
            But I notice something else, when i type:
            select * from dba_repcatlog
            I saw there is diffrent global_name which I have actually - 'cracow.danek.shop'. Before updating global_name I had 'cracow.online.shop' but I noticed that 'online' is keyword for Oracle.
            I couldn`t rename database global_name typing: 'ALTER DATABASE RENAME GLOBAL_NAME TO cracow.danek.shop' because sqlplus didn`t work after this command.

            dba_repcatlog:
                ERRNUM GNAME
            ---------- ------------------------------
            CRACOW.ONLINE.SHOP
            
                    ID
            ----------
            SOURCE
            --------------------------------------------------------------------------------
            
            STATUS         USERID                         TIMESTAM ROLE
            -------------- ------------------------------ -------- ---------
            MASTER
            --------------------------------------------------------------------------------
            
            SNAME                          REQUEST
            ------------------------------ -----------------------------
            ONAME                          TYPE
            ------------------------------ ------------
            MESSAGE
            --------------------------------------------------------------------------------
            
                ERRNUM GNAME
            ---------- ------------------------------
            REPTEST                        CREATE_MASTER_REPOBJECT
            
                    ID
            ----------
            SOURCE
            --------------------------------------------------------------------------------
            
            STATUS         USERID                         TIMESTAM ROLE
            -------------- ------------------------------ -------- ---------
            MASTER
            --------------------------------------------------------------------------------
            
            SNAME                          REQUEST
            ------------------------------ -----------------------------
            ONAME                          TYPE
            ------------------------------ ------------
            MESSAGE
            --------------------------------------------------------------------------------
            
                ERRNUM GNAME
            ---------- ------------------------------
            PROVINCES                      TABLE
            
                    ID
            ----------
            SOURCE
            --------------------------------------------------------------------------------
            
            STATUS         USERID                         TIMESTAM ROLE
            -------------- ------------------------------ -------- ---------
            MASTER
            --------------------------------------------------------------------------------
            
            SNAME                          REQUEST
            ------------------------------ -----------------------------
            ONAME                          TYPE
            ------------------------------ ------------
            MESSAGE
            --------------------------------------------------------------------------------
            
                ERRNUM GNAME
            ---------- ------------------------------
            
            
                    ID
            ----------
            SOURCE
            --------------------------------------------------------------------------------
            
            STATUS         USERID                         TIMESTAM ROLE
            -------------- ------------------------------ -------- ---------
            MASTER
            --------------------------------------------------------------------------------
            
            SNAME                          REQUEST
            ------------------------------ -----------------------------
            ONAME                          TYPE
            ------------------------------ ------------
            MESSAGE
            --------------------------------------------------------------------------------
            
                ERRNUM GNAME
            ---------- ------------------------------
                       GROUPCRACOW
            
                    ID
            ----------
            SOURCE
            --------------------------------------------------------------------------------
            
            STATUS         USERID                         TIMESTAM ROLE
            -------------- ------------------------------ -------- ---------
            MASTER
            --------------------------------------------------------------------------------
            
            SNAME                          REQUEST
            ------------------------------ -----------------------------
            ONAME                          TYPE
            ------------------------------ ------------
            MESSAGE
            --------------------------------------------------------------------------------
            
                ERRNUM GNAME
            ---------- ------------------------------
            
            
                    ID
            ----------
            SOURCE
            --------------------------------------------------------------------------------
            
            STATUS         USERID                         TIMESTAM ROLE
            -------------- ------------------------------ -------- ---------
            MASTER
            --------------------------------------------------------------------------------
            
            SNAME                          REQUEST
            ------------------------------ -----------------------------
            ONAME                          TYPE
            ------------------------------ ------------
            MESSAGE
            --------------------------------------------------------------------------------
            
                ERRNUM GNAME
            ---------- ------------------------------
                     2
            
                    ID
            ----------
            SOURCE
            --------------------------------------------------------------------------------
            
            STATUS         USERID                         TIMESTAM ROLE
            -------------- ------------------------------ -------- ---------
            MASTER
            --------------------------------------------------------------------------------
            
            SNAME                          REQUEST
            ------------------------------ -----------------------------
            ONAME                          TYPE
            ------------------------------ ------------
            MESSAGE
            --------------------------------------------------------------------------------
            • 3. Re: Problem with creating replication object
              spajdy
              Renaming DB could be a problem, because when Advanced Replication is used global_name mus t be set to TRUE to enforce DB name uniqueness.
              So try to drop all replicated object including master group you created.
              If you don't succeed then try rename DB back to original name and then drop replicated object.
              When this don't help then I see only two options:
              1/ ask ORACLE for help using metalink
              2/ create new DB with correct name and move all data there then set up replication