The DDL configuration of Golden Gate

Source: Internet
Author: User

Configuration of DDL Replication

  1. Currently only supported for Oracle and Teradata DDL replication
  2. Oracle can replicate all objects except system objects
  3. Two methods of configuration:
    1. Trigger-based DDL: has a certain impact on the production library.
      1. Principle:
        1. The Source Library establishes an Oracle full-library-level trigger capture DDL operation to the intermediate table.
        2. Extract reads the DDL statements of the intermediate table and sorts the DML statements according to the CSN.
        3. The target side reproduces the DDL operation SQL statement.
      2. Characteristics:
        1. The DDL and DML replication principles are different:
        2. DDL replication based on TRIGGER,DML replication is based on the log, the two mechanisms of replication, the data capture between them is not linked, but in the main extract process through the SCN number in the order in which they are assembled, to ensure that DDL operations and DML operations in their original order.
        3. DDL and DML replication are independent of each other: After the DDL replication trigger is established, the trigger has been in effect, capturing the DDL SQL statements to the intermediate table, regardless of whether DML replication is running. Therefore, the start-stop of DML replication does not affect the capture of DDL, and the enabling and stopping of DDL trigger does not affect the replication of DML, except that the trigger is disabled and no longer fetches DDL operations, except that DDL and DML are ordered by the SCN in extract assembly. There is no other connection.
        4. DDL replication is just a simple SQL copy. Fetch the SQL and throw it to the target to re-execute it again.
        5. Opening DDL replication automatically creates new and modified objects for each patch, and automatically maintains additional logs for it, eliminating the need for manual intervention to reduce labor effort.
      3. Principle of Use:
        1. Both ends must be an Oracle database: DDL extraction with standby db is not supported.
        2. Supports bidirectional replication DDL (only 2 nodes supported)
        3. The structure of the two ends of the table is consistent; (Replicat:assumetargetdefs)
        4. DDL transform (map and filter support) are not supported
        5. DDL statements are less than 2M in size;
        6. Pump process irresponsible any map and filter, using PassThru
        7. The daily amount of the database should not be too large: less than 100g; the performance is affected by the Convention.
        8. Application system in the database can not have frequent DDL operations, in the ERP system, such as the frequent establishment of intermediate tables and other operations, this time performance is also greatly affected.
      4. Default:
        1. By default: Extract is turned off for DDL, and the data pump process and Replicat are turned on by default. Therefore, you only need to configure DDL replication in the extract process. However, it is recommended to configure DDL-related properties in Replicat;
        2. The REPLICAT process defaults to all DDL replication, and if more than one replicat process is running, it must be configured on each replicat, otherwise it will cause duplicate replication.
        3. DDL operations for users with Goldengate users and Oracle databases are not replicated.
        4. When you turn on full DDL support, you do not need to use the Gettruncates parameter in the parameter file.
      5. DDL replication Scope defines:
        1. All: Indicates that all DDL operations are replicated, and all DDL generated by the source library is placed in the queue.
        2. MAPPED: Indicates that only the tables specified in the following table parameters are copied, the associated objects, such as indexes, column changes, and so on, if you want to copy the newly created tables, the tables must either appear in the table statement or conform to the criteria used in the table.
        3. Unmapped: Indicates that only related DDL for tables that are not in the table scope are copied.
        4. Other: The scope represents unrelated DDL operations: for example, the operation of the database itself, the user, the tablespace, the data file. Generally not used in practice.
        5. OPTYPE: Operation type: for example: Create,alter
        6. OBJTYPE: Object range: such as table or index
        7. ObjName: Object Name:
        8. INSTR: The range of keywords
      6. Practical examples
        Ddl&INCLUDE MAPPED OBJTYPE'Table' & --The $ symbol is a career change symbol, which reduces the error rate. INCLUDE MAPPED OBJTYPE'Index'ddloptions Addtrandata, NocrossrenameTableAbc.*--to reduce the error rate, it is recommended to replicate only the main objects such as tables and indexes in map range;--If you want to copy a new table, the table must be within the range specified in the following table (typically X)--trandata: Update additional logs automatically, or add SchematrandataDdl[{INCLUDE | EXCLUDE}][, MAPPED | UNMAPPED | Other | All][, OPTYPE <type>][, objname "<name>"][, INSTR ' <string> ']
      7. Several minor problems based on Trigger:
        1. Database (Source Library) If it is 10g, you must close the Recycle Bin. Avoid the extraction of the invisible DDL, there may be two operations, 11g later do not need, the principle of change.
        2. Goldengate requires a separate tablespace: cannot be shared.
        3. Prior to executing the DDL_SETUP.SQL, explicit authorization is required: CREATE TABLE, create sequence, even with DBA authority.
        4. Approximate steps: Marker_setup--DDL Setup--Role Setup-enable DDL trigger
      8. A few exceptions explain:
        1. Tests related to target database consistency:
          1. Create job does not support
          2. The CREATE trigger can be copied and enabled, so it must be manually set to disable or Replicat parameters;
          3. Create Tablespace can be copied, can support copying to different file directories;
          4. Copy of the CTAs statement: The final result is based on local data (e.g. CREATE TABLE xx as select * from Dba_objects;)
          5. Rename T1 to T2 will be converted into ALTER TABLE T1 rename to T2 (View report REP1)
          6. Flashback table to SCN---can support replication
          7. Flashback table to before drop-replication not supported
    2. Native DLL (log parsing via Logminer server –ogg12c + integrated extract +db11204 and above): Parse from the log.
      1. Version requirements: ogg12c, db11204, above; compatible set 11.2.0.4 or above; downstream mode, Sourcedb also meet the above requirements.
      2. Integrated extraction Mode
      3. parameter is not changed

New features for 12c replication

Truncate replication

Configuration for sequence replication

Compression configuration

Encryption Configuration

TDE transparent technology for the extraction of encrypted columns

The DDL configuration of Golden Gate

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.