Wednesday, 10 December 2014

Golden Gate Preventing Data Looping

Original document is here : 

https://docs.oracle.com/goldengate/1212/gg-winux/GWUAD/wu_bidirectional.htm#i1036715

In short, Goal is to identify which process causes to replicate, and if the process is replicat, ignore it.

If your database is oracle and capture mode is direct :

Use these options :
  • GETAPPLOPS | IGNOREAPPLOPS: Controls whether or not data operations (DML) produced by business applications except Replicat are included in the content that Extract writes to a specific trail or file.
  • GETREPLICATES | IGNOREREPLICATES: Controls whether or not DML operations produced by Replicat are included in the content that Extract writes to a specific trail or file.
If your database is oracle and capture mode is integrated:
Use this method :

  • Use DBOPTIONS with the SETTAG option in the Replicat parameter file. Replicat tags the transactions being applied with the specified value, which identifies those transactions in the redo stream. The default SETTAG value is 00. Valid values are a single TAG value consisting of hexadecimal digits. For more information about tags, see Reference for Oracle GoldenGate for Windows and UNIX.
  • Use the TRANLOGOPTIONS parameter with the EXCLUDETAG option in the Extract parameter file. The logmining server associated with that Extract excludes redo that is tagged with the SETTAG value.
    The following shows how SETTAG can be set in the Replicat parameter file:
    DBOPTIONS SETTAG 0935
    
    The following shows how EXCLUDETAG can be set in the Extract parameter file:
    TRANLOGOPTIONS EXCLUDETAG 0935
    
    If you are excluding multiple tags, each must have a separate TRANLOGOPTIONS EXCLUDETAG statement specified.

Thursday, 4 December 2014

OGG-01223 TCP/IP error 10061 (No connection could be made beacause the target machine actively refused it)


OGG-01223 TCP/IP error 10061 (No connection could be made because the target machine actively refused it)

Solution is too simple  :
  Are you sure that target and source manager processes are started?

GGSCI-> info manager
GGSCI-> start manager

ORA-65005: missing or invalid file name pattern for file ORA-01276: Cannot add file



This situation is valid for Oracle 12c Multitenant architecture, Pluggable databases and OMF. Please read the blog item in detail to understand the cause.



We prepared a template database :

    SQL> select file_name from dba_data_files;
    FILE_NAME
    +DATA/PDBTemplate/system.273.829388755
    +DATA/PDBTemplate/sysaux.272.829388715
    +DATA/PDBTemplate/users.268.829388341
    +DATA/PDBTemplate/apex_space.271.829388439
    +DATA/PDBTemplate/edge_010_data.266.829388045

So we wanted to allow the developers to clone the database to test changes. But we encountered a problem :
    SQL> create pluggable database Developer from PDBTemplate file_name_convert = (Developer, PDBTemplate);
    create pluggable database
    *
    ERROR at line 1:
    ORA-01276: Cannot add file +DATA/PDBTemplate/system.273.829388755.

File has an Oracle Managed Files file name. Therefore it looks like the OMF file naming causes us some problems. We corrected the problem with this :

    SQL> create pluggable database Developer from PDBTemplate file_name_convert =
    (
    ・DATA/PDBTemplate/system.273.829388755',・DATA/Developer/system01.dbf・
    ・DATA/PDBTemplate/users.268.829388341',・DATA/Developer/users01.dbf・
    ・DATA/PDBTemplate/sysaux.272.829388715',・DATA/Developer/sysaux01.dbf・
    ・DATA/PDBTemplate/edge_010_data.266.829388045',・DATA/Developer/edge_01.dbf・
    ・DATA/PDBTemplate/apex_space.271.829388439',・DATA/Developer/apex_space01.dbf・
    ); 2 3 4 5 6 7 8
    create pluggable database olakits from ola file_name_convert =
    *
    ERROR at line 1:
    ORA-65005: missing or invalid file name pattern for file -
    /u00/oracle/oradata/PCDB/OLA/temp01.dbf

But It seems that I have forgotten to add temp file

    SQL> create pluggable database olakits from ola file_name_convert =
    (
    ・DATA/PDBTemplate/system.273.829388755',・DATA/Developer/system01.dbf・
    ・DATA/PDBTemplate/users.268.829388341',・DATA/Developer/users01.dbf・
    ・DATA/PDBTemplate/sysaux.272.829388715',・DATA/Developer/sysaux01.dbf・
    ・DATA/PDBTemplate/edge_010_data.266.829388045',・DATA/Developer/edge_01.dbf・
    ・u00/oracle/oradata/PDBTemplate/temp01.dbf・ ・DATA/Developer/temp01.dbf・
    );

Pluggable database created.

It seems everything is OK

OGG-01950 No Privileges on tablespace ...

OGG-01950 No Privileges on tablespace tablespace_xxx.


Cause: User does not have privileges to allocate an extent in the specified tablespace.

Action: Grant the user the appropriate system privileges or grant the user space resource on the tablespace.

In our case :

alter user aliyagmur quota unlimited on tablespace_xxx;

OGG 02022 Logmining server does not exist on this Oracle database.

 

While Replicating Oracle 12c Pluggable Databases with GoldenGate, you may encounter with this error : OGG-02022 Logmining server does not exist on this Oracle database. This shows that extract needs to be registered for each PDB that the extract will work against. Using GGSCI use the dblogin command to login
 dblogin userid ggs_admin, password oracle
  and then run
 register extract ext_esk database container (dev1, dev2)

Wednesday, 3 December 2014

OGG 00919


A simple but intricating error.

Please check quotation sign. I mean you may need replace " with '.


Another causes may be related with wrong usage of parameter. Check parameters.