
SQL>alter database add supplemental log data(primary key,unique,foreign key) columns;
SQL>select supplemental_log_data_min,supplemental_log_data_pk,supplemental_log_data_ui from v$database;
SQL
>alter system set enable_goldengate_replication=true;
SQL> ALTER SYSTEM SWITCH LOGFILE;
GGSCI (sfa-sms-test) 1> dblogin userid C##OGG@newsmspdb,password C##OGG123
Successfully logged into database NEWSMSPDB.
GGSCI>ADD SCHEMATRANDATA newsms
GGSCI>ADD SCHEMATRANDATA newsms ALLCOLS
ADD SCHEMATRANDATA schema [ALLCOLS | NOSCHEDULINGCOLS]
在没有选项的情况下,ADD SCHEMATRANDATA模式允许在源系统上对主键进行无条件补充日志记录,并对给定模式中所有当前和未来表的所有唯一键和外键进行条件补
充日志记录。无条件日志将主键值强制记录到日志中,无论当前操作中是否更改了该键。如果在当前操作中至少更改了一个外键或唯一键的列值,则条件日志记录该外键或
ALLCOLS可用于启用对表中所有列的无条件补充日志记录,并适用于给定模式中的所有当前和未来表。当源表和目标表具有不同的调度列时,用于支持集成副本。(调度列
NOSCHEDULINGCOLS只记录模式中现有表和稍后添加的新表的主键值和所有有效的惟一索引。这是模式级日志记录的最低要求级别,仅对非集成模式下的副本有效。
Oracle GoldenGate支持模式级补充日志记录。当使用Oracle GoldenGate DDL复制特性时,Oracle源数据库需要模式级日志记录。在所有其他用例中,它都是可选的,
但是您必须使用表级日志记录默认情况下,模式级日志自动支持对模式中所有表的主键进行无条件补充日志记录,对惟一键和外键进行条件补充日志记录。选项允许您根据
Oracle strongly recommends using schema-level logging rather than table-level logging, because it ensures that any new tables added to a schema are
captured if they satisfy wildcard specifications.
在不使用模式级日志记录时启用所需的日志记录级别。必须使用模式级或表级日志记录。默认情况下,表级日志自动启用表的主键的无条件补充日志记录和表的惟一键和外
键的条件补充日志记录。选项允许您根据需要更改日志记录。
在表级记录非键列值,以支持特定的Oracle GoldenGate特性,如过滤。
ADD TRANDATA [container.]schema.table [, COLS (columns)] [, NOKEY] [, ALLCOLS | NOSCHEDULINGCOLS]
container is the name of the root container or pluggable database if the table is in a multitenant container database.
schema is the source schema that contains the table.
table is the name of the table. See Administering Oracle GoldenGate for Windows and UNIX for instructions for specifying object names.
ADD TRANDATA without other options automatically enables unconditional supplemental logging of the primary key and conditional supplemental
logging of unique key(s) and foreign key(s) of the table. Unconditional logging forces the primary key values to the log whether or not the key was
changed in the current operation. Conditional logging logs all of the column values of a foreign or unique key if at least one of them was changed in
the current operation. The default is optional to support nonintegrated Replicat (see also NOSCHEDULINGCOLS) but is required to support integrated
Replicat because primary key, unique keys, and foreign keys must all be available to the inbound server to compute dependencies. For more
information about integrated Replicat, see Section 5.3, "Deciding Which Apply Method to Use".
ALLCOLS enables the unconditional supplemental logging of all of the columns of the table. Use to support integrated Replicat when the source and
target tables have different scheduling columns. (Scheduling columns are the primary key, the unique key, and the foreign key.)
NOSCHEDULINGCOLS is valid for Replicat in nonintegrated mode only. It issues an ALTER TABLE command with an ADD SUPPLEMENTAL LOG DATA
ALWAYS clause that is appropriate for the type of unique constraint that is defined for the table, or all columns in the absence of a unique constraint.
This command satisfies the basic table-level logging requirements of Oracle GoldenGate when schema-level logging will not be used. See Section 10.1,
"Ensuring Row Uniqueness in Source and Target Tables" for how Oracle GoldenGate selects a key or index.
COLS columns logs non-key columns that are required for a KEYCOLS clause or for filtering and manipulation. The parentheses are required. These
columns will be logged in addition to the primary key unless the NOKEY option is also present.
NOKEY prevents the logging of the primary key or unique key. Requires a KEYCOLS clause in the TABLE and MAP parameters and a COLS clause in the
分区 oracle12c_ogg安装配置 的第 3 页
相关文档
评论