当前位置 博文首页 > LuciferLiu_DBA:OGG add schematrandata报错 OGG-01790

    LuciferLiu_DBA:OGG add schematrandata报错 OGG-01790

    作者:[db:作者] 时间:2021-06-16 14:15

    一、问题记录

    GGSCI (s11g) 50> add schematrandata scott
    
    2021-03-25 10:14:53  ERROR   OGG-01790  Failed to ADD SCHEMATRANDATA on schema scott because of the following SQL error: ORA-26947: Oracle GoldenGate replication is not enabled.
    ORA-06512: at "SYS.DBMS_CAPTURE_ADM_INTERNAL", line 1565
    ORA-06512: at "SYS.DBMS_CAPTURE_ADM_INTERNAL", line 1074
    ORA-06512: at "SYS.DBMS_CAPTURE_ADM", line 722
    ORA-06512: at line 1 SQL BEGIN sys.dbms_capture_adm.PREPARE_SCHEMA_INSTANTIATION('scott','ALLKEYS_ON'); END;.
    
    GGSCI (s11g) 51> info schematrandata scott
    
    2021-03-25 10:17:53  INFO    OGG-01786  Schema level supplemental logging is disabled on schema SCOTT.
    

    二、问题排查

    oracle@s11g:/home/oracle$ oerr ora 26947
    26947, 00000, "Oracle GoldenGate replication is not enabled."
    // *Cause: The 'enable_goldengate_replication' parameter was not set to 'true'.
    // *Action: Set the 'enable_goldengate_replication' parameter to 'true'
    //           and retry the operation.
    //          Oracle GoldenGate license is needed to use this parameter.

    摘自:ENABLE_GOLDENGATE_REPLICATION database parameter (Doc ID 1568417.1)

    For Oracle DB versions 11.2.0.4 and 12.1.0.2 there will be a new init.ora parameter called ENABLE_GOLDENGATE_REPLICATION.  In order for some of the Oracle GoldenGate functionality to work, this parameter must be set to true.  It will enable access to the TDE/TSE integration with classic extract, Integrated Capture, Integrated Apply,  DBLOGREADER functionality, replicat functionality like suppression of triggers and deferring referential constrains, and other integration points.  
    
    So, in order to use OGG, on Oracle 11.2.0.4, or Oracle 12.1.0.2+, you will need to issue the following command through SQL*Plus. 
    
    ALTER SYSTEM SET ENABLE_GOLDENGATE_REPLICATION = TRUE SCOPE=BOTH;
    
    This only needs to be done once, and in a RAC environment,will take effect on all instances.   It can be done without bouncing the database instance, and you’ll want to use SCOPE=BOTH or update the init.ora file to ensure that when the database is bounced, the setting remains in effect. 
    
    If this parameter is not set and/or missing privileges (exec DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE ( '<appropriate user>' ); ) you may get an Oracle error, ORA-26947 or ORA-26945 when attempting to use any of the GoldenGate functionality.

    三、解决方案

    Tips:在源端和目标端数据库同时开启ENABLE_GOLDENGATE_REPLICATION

    SYS@orcl>ALTER SYSTEM SET ENABLE_GOLDENGATE_REPLICATION = TRUE SCOPE=BOTH;
    
    System altered.
    
    
    GGSCI (s11g) 52> add schematrandata scott
    
    2021-03-25 10:30:49  INFO    OGG-01788  SCHEMATRANDATA has been added on schema scott.
    
    GGSCI (s11g) 53> info schematrandata scott
    
    2021-03-25 10:53:04  INFO    OGG-01785  Schema level supplemental logging is enabled on schema SCOTT.
    

    ?

    下一篇:没有了