Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
配置Golden gate同步ddl语句
1. 配置 GoldenGate 同步
DDL 语句
by Maclean.liu
liu.maclean@gmail.com
www.oracledatabase12g.com
2. About Me
l Email:liu.maclean@gmail.com
l Blog:www.oracledatabase12g.com
l Oracle Certified Database Administrator Master 10g
and 11g
l Over 6 years experience with Oracle DBA technology
l Over 7 years experience with Linux technology
l Member Independent Oracle Users Group
l Member All China Users Group
l Presents for advanced Oracle topics: RAC,
DataGuard, Performance Tuning and Oracle Internal.
4. -r-xr-xr-x 1 maclean oinstall 228606 06-29 13:48 ddl_setup.sql
-r--r--r-- 1 maclean oinstall 8872 2010-03-12 ddl_status.sql
-r--r--r-- 1 maclean oinstall 2506 2010-03-12 ddl_staymetadata_off.sql
-r--r--r-- 1 maclean oinstall 2501 2010-03-12 ddl_staymetadata_on.sql
-r--r--r-- 1 maclean oinstall 2955 2010-03-12 ddl_tracelevel.sql
-r--r--r-- 1 maclean oinstall 2543 2010-03-12 ddl_trace_off.sql
-r--r--r-- 1 maclean oinstall 2862 2010-03-12 ddl_trace_on.sql
/* 执行 goldengate ddl 同步安装脚本要求以 SYSDBA 身份登录 */
[maclean@rh2 gg]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Dec 6 18:01:46 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter system set recyclebin=off;
System altered.
/* 同步 DDL 要求我们关闭 10g 中的回收站特性 */
SQL> @marker_setup
Marker setup script
You will be prompted for the name of a schema for the GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.
Enter GoldenGate schema name:maclean
Marker setup table script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to MACLEAN
MARKER TABLE
-------------------------------
OK
MARKER SEQUENCE
-------------------------------
OK
Script complete.
/* 以 SYSDBA 登陆数据库并执行当前 GG 安装目录下的 market_setup 脚本,该脚本用以建立一个 DDL 标记表
5. 包括以下列:
seqNo NUMBER NOT NULL, -- sequence number
fragmentNo NUMBER NOT NULL, -- fragment number (message divided into fragments)
optime CHAR(19) NOT NULL, -- time of operation
TYPE VARCHAR2 (100) NOT NULL, -- type of marker
SUBTYPE VARCHAR2 (100) NOT NULL, -- subtype of marker
marker_text VARCHAR2 (4000) NOT NULL,
-- fragment text (message divided into fragments numbered with fragmentNo)
*/
SQL> @ddl_setup
GoldenGate DDL Replication setup script
Verifying that current user has privileges to install DDL Replication...
Checking user sessions...
Check complete.
You will be prompted for the name of a schema for the GoldenGate database objects.
NOTE: For an Oracle 10g source, the system recycle bin must be disabled. For Oracle 11g
and later, it can be enabled.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.
Enter GoldenGate schema name:maclean
You will be prompted for the mode of installation.
To install or reinstall DDL replication, enter INITIALSETUP
To upgrade DDL replication, enter NORMAL
Enter mode of installation:INITIALSETUP
Working, please wait ...
Spooling to file ddl_setup_spool.txt
Using MACLEAN as a GoldenGate schema name, INITIALSETUP as a mode of installation.
Working, please wait ...
RECYCLEBIN must be empty.
This installation will purge RECYCLEBIN for all users.
To proceed, enter yes. To stop installation, enter no.
6. Enter yes or no:yes
DDL replication setup script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to MACLEAN
DDLORA_GETTABLESPACESIZE STATUS:
Line/pos Error
---------- -----------------------------------------------------------------
No errors No errors
CLEAR_TRACE STATUS:
Line/pos Error
---------- -----------------------------------------------------------------
No errors No errors
CREATE_TRACE STATUS:
Line/pos Error
---------- -----------------------------------------------------------------
No errors No errors
TRACE_PUT_LINE STATUS:
Line/pos Error
---------- -----------------------------------------------------------------
No errors No errors
INITIAL_SETUP STATUS:
Line/pos Error
---------- -----------------------------------------------------------------
No errors No errors
DDLVERSIONSPECIFIC PACKAGE STATUS:
Line/pos Error
---------- -----------------------------------------------------------------
No errors No errors
7. DDLREPLICATION PACKAGE STATUS:
Line/pos Error
---------- -----------------------------------------------------------------
No errors No errors
DDLREPLICATION PACKAGE BODY STATUS:
Line/pos Error
---------- -----------------------------------------------------------------
No errors No errors
DDL HISTORY TABLE
-----------------------------------
OK
DDL HISTORY TABLE(1)
-----------------------------------
OK
DDL DUMP TABLES
-----------------------------------
OK
DDL DUMP COLUMNS
-----------------------------------
OK
DDL DUMP LOG GROUPS
-----------------------------------
OK
DDL DUMP PARTITIONS
-----------------------------------
OK
DDL DUMP PRIMARY KEYS
-----------------------------------
OK
DDL SEQUENCE
-----------------------------------
OK
GGS_TEMP_COLS
-----------------------------------
OK
GGS_TEMP_UK
-----------------------------------
OK
8. DDL TRIGGER CODE STATUS:
Line/pos Error
---------- -----------------------------------------------------------------
No errors No errors
DDL TRIGGER INSTALL STATUS
-----------------------------------
OK
DDL TRIGGER RUNNING STATUS
-----------------------------------
ENABLED
STAYMETADATA IN TRIGGER
-----------------------------------
OFF
DDL TRIGGER SQL TRACING
-----------------------------------
0
DDL TRIGGER TRACE LEVEL
-----------------------------------
0
LOCATION OF DDL TRACE FILE
--------------------------------------------------------------------------------
/s01/10gdb/admin/clinica/udump/ggs_ddl_trace.log
Analyzing installation status...
STATUS OF DDL REPLICATION
--------------------------------------------------------------------------------
SUCCESSFUL installation of DDL Replication software components
Script complete.
/* 以 INITIALSETUP 选项运行 ddl_setup.sql 将在数据库中创建捕获 DDL 语句的 Trigger 等必要组件 */
SQL> @role_setup
GGS Role setup script
This script will drop and recreate the role GGS_GGSUSER_ROLE
To use a different role name, quit this script and then edit the params.sql script to
9. change the gg_role parameter to the preferred name. (Do not run the script.)
You will be prompted for the name of a schema for the GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.
Enter GoldenGate schema name:maclean
Wrote file role_setup_set.txt
PL/SQL procedure successfully completed.
Role setup script complete
Grant this role to each user assigned to the Extract, GGSCI, and Manager processes, by
using the following SQL command:
GRANT GGS_GGSUSER_ROLE TO
where is the user assigned to the GoldenGate processes.
/* role_setup 脚本用以建立 GGS_GGSUSER_ROLE 角色 */
我们需要将该 GGS_GGSUSER_ROLE 授予给 extract group 参数中定义的 userid 用户
SQL> grant GGS_GGSUSER_ROLE to maclean;
Grant succeeded.
SQL> @ddl_enable
Trigger altered.
/*ddl_enable.sql 将正式 enable ddl 捕获触发器,即:ALTER TRIGGER sys .&ddl_trigger_name ENABLE;
*/
SQL> @?/rdbms/admin/dbmspool
Package created.
Grant succeeded.
View created.
Package body created.
/* 执行 dbmspool 包将在数据库中创建 DBMS_SHARED_POOL 包,之后需要用到*/
SQL> @ddl_pin
Enter value for 1: maclean
PL/SQL procedure successfully completed.
Enter value for 1: maclean
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
11. /* 以上为源端的 extract load1 的配置,采用了 DDL INCLUDE MAPPED 的 DDL 同步方式 */
GGSCI (rh3.oracle.com) 59> add replicat rep1,exttrail /s01/rmt/ma,begin
now,checkpointtable maclean.checkpoint
REPLICAT added.
GGSCI (rh3.oracle.com) 62> view params rep1
replicat rep1
userid maclean,password maclean
ASSUMETARGETDEFS
discardfile /s01/discard/rep1.log,append,megabytes 10
-- Support DDL here
DDL
map sender.* , target receiver.*;
GGSCI (rh3.oracle.com) 60> start replicat rep1
Sending START request to MANAGER ...
REPLICAT REP1 starting
GGSCI (rh3.oracle.com) 63> info all
Program Status Group Lag Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING REP1 00:00:00 00:00:07
/* 以上为目标端的 replicat rep1 配置,DDL 语句将由 sender 用户映射到 receiver 用户 */
接下来我们对具体的 DDL 同步进行测试:
/ * 在源端建立测试用表 tddl */
SQL> conn sender/sender
Connected.
SQL> create table tddl (t1 int);
Table created.
12. REP1.rep 报告文件出现以下信息:
Opened trail file /s01/rmt/ma000000 at 2010-12-07 03:50:19
2010-12-07 03:52:13 INFO OGG-01407 Setting current schema for DDL operation to
[RECEIVER].
2010-12-07 03:52:13 INFO OGG-01408 Restoring current schema for DDL operation to
[MACLEAN].
SQL> conn receiver/receiver;
Connected.
SQL> desc tddl
Name Null? Type
----------------------------------------- -------- ----------------------------
T1 NUMBER(38)
/* create table 的 DDL 语句被正确同步了 */
/* 可以从 gg 管理者名下的 ggs_marker 表看到捕获到的建表语句
似乎可以分为 DDL 正文和变量 2 段
*/
SQL> set linesize 65 pagesize 1400;
SQL> select marker_text
2 from ggs_marker
3 where seqno =
(select seqno from ggs_marker where marker_text like '%tddl%');
4
MARKER_TEXT
-----------------------------------------------------------------
,C1='create table tddl (t1 int) ',
,C5='16',,B2='',,G4='',,B3='SENDER',,B4='TDDL',,C12='',,C13='',,B
5='TABLE',,B6='CREATE',,B7='16',,B8='MACLEAN.GGS_DDL_HIST',,B9='S
ENDER',,C7='10.2.0.4.0',,C8='10.2.0.3',,C9='',,C10='1',,C11='clin
ica',,G3='NONUNIQUE',,C14='NO',,C17('1')='NLS_LANGUAGE',,C18('1')
='AMERICAN',,C17('2')='NLS_TERRITORY',,C18('2')='AMERICA',,C17('3
')='NLS_CURRENCY',,C18('3')='$',,C17('4')='NLS_ISO_CURRENCY',,C18
('4')='AMERICA',,C17('5')='NLS_NUMERIC_CHARACTERS',,C18('5')='.,
',,C17('6')='NLS_CALENDAR',,C18('6')='GREGORIAN',,C17('7')='NLS_D
ATE_FORMAT',,C18('7')='DD-MON-RR',,C17('8')='NLS_DATE_LANGUAGE',,
C18('8')='AMERICAN',,C17('9')='NLS_SORT',,C18('9')='BINARY',,C17(
'10')='NLS_TIME_FORMAT',,C18('10')='HH.MI.SSXFF AM',,C17('11')='N
13. LS_TIMESTAMP_FORMAT',,C18('11')='DD-MON-RR HH.MI.SSXFF AM',,C17('
12')='NLS_TIME_TZ_FORMAT',,C18('12')='HH.MI.SSXFF AM TZR',,C17('1
3')='NLS_TIMESTAMP_TZ_FORMAT',,C18('13')='DD-MON-RR HH.MI.SSXFF A
M TZR',,C17('14')='NLS_DUAL_CURRENCY',,C18('14')='$',,C17('15')='
NLS_COMP',,C18('15')='BINARY',,C17('16')='NLS_LENGTH_SEMANTICS',,
C18('16')='BYTE',,C17('17')='NLS_NCHAR_CONV_EXCP',,C18('17')='FAL
SE',,C19='17',
SQL> conn sender/sender
Connected.
SQL> insert into tddl values(&a);
Enter value for a: 1
old 1: insert into tddl values(&a)
new 1: insert into tddl values(1)
1 row created.
SQL> /
Enter value for a: 2
old 1: insert into tddl values(&a)
new 1: insert into tddl values(2)
1 row created.
SQL> commit;
Commit complete.
SQL> alter table tddl add tclob clob default 'I am testing';
Table altered.
/* 我们来看看添加有默认值的 clob 字段这样的 DDL 语句是否能够同步成功 */
SQL> conn receiver/receiver
Connected.
SQL> set linesize 100 pagesize 1400;
SQL> select * from tddl;
T1 TCLOB
----------
--------------------------------------------------------------------------------
1 I am testing
14. 2 I am testing
/* 以上测试表明 gg 成功复制了添加有默认值的 clob 字段这样的 DDL 语句 */
我们可以从源端的$ORACLE_BASE/admin/$sid/udump 目录下的 ggs_ddl_trace.log 日志文件中找到以下记录:
SESS 154688-2010-12-06 19:08:42 : DDL : *************************
Start of log for DDL sequence [18], v[ $Id:
//depot/releases/OpenSys/v11.1.1.0/redist/SQLScripts/ddl_
setup.sql#2 $ ] trace level [0], owner schema of DDL package [MACLEAN], objtype [TABLE]
name [SENDER.TDDL]
SESS 154688-2010-12-06 19:08:42 : DDLTRACE1 : Before Trigger: point in
execution = [1.0], objtype [TABLE] name [SENDER.TDDL]
SESS 154688-2010-12-06 19:08:42 : DDL : DDL operation
[ alter table tddl add tclob clob default 'I am testing' ], sequence [18],
DDL type [ALTER] TABLE, real object ty
pe [TABLE], validity [VALID], object ID [57772], object [SENDER.TDDL],
real object [SENDER.TDDL], base object schema [], base object name [], logged as [SENDER]
SESS 154688-2010-12-06 19:08:42 : DDL : Start SCN found [45357217]
SESS 154688-2010-12-06 19:08:42 : DDL : ------------------------- End of log for DDL
sequence [18]
接下来我们会测试更多不同 DDL 语句的同步,这些我能想到的 DDL 语句包括:
• CREATE USER
• CREATE TABLESPACE
• CREATE PROCEDURE
• CREATE PROFILE
• CREATE DIRECTORY
• CREATE EXTERNAL TABLE 等等
15. 但在这之前我们需要修改我们在 GoldenGate 同步 DDL 语句(1)中配置的 extract 和 replicat 的参数文件:
GGSCI (rh2.oracle.com) 2> view params load1
extract load1
userid maclean, password AACAAAAAAAAAAAHANCUEFHPAVCYDNJVD,encryptkey default
RMTHOST rh3.oracle.com, MGRPORT 7809
RMTTRAIL /s01/rmt/ma
DDL INCLUDE ALL
Table sender.*;
/*源端将 DLL INCLUDE MAPPED 修改为 DLL INCLUDE ALL,
不同于 MAPPED,INCLUDE ALL 意味包含所有 DDL 语句
MAPPED applies INCLUDE or EXCLUDE to DDL operations that are of
MAPPED scope. MAPPED filtering is performed before filtering that is
specified with other DDL parameter options
ALL applies INCLUDE or EXCLUDE to DDL operations of all scopes.
*/
GGSCI (rh2.oracle.com) 4> stop extract load1
Sending STOP request to EXTRACT LOAD1 ...
Request processed.
GGSCI (rh2.oracle.com) 5> start extract load1
Sending START request to MANAGER ...
EXTRACT LOAD1 starting
GGSCI (rh3.oracle.com) 3> view params rep1
replicat rep1
userid maclean,password maclean
ASSUMETARGETDEFS
discardfile /s01/discard/rep1.log,append,megabytes 10
-- Support DDL here
DDL INCLUDE ALL
DDLERROR DEFAULT IGNORE RETRYOP MAXRETRIES 3 RETRYDELAY 5
map sender.* , target receiver.*;
16. /* 目标端也需要将原来的 DDL 补充为 DDL INCLUDE ALL 以及加上
DDLERROR DEFAULT IGNORE RETRYOP MAXRETRIES 3 RETRYDELAY 5 */
/* DDLERROR 参数指定了出现 DDL 同步错误时的处理方式,此处为以 5 秒(RETRYDELAY)
为间隔重试 3 次(MAXRETRIES),若该 DDL 仍报错,则忽略该 DDL
*/
GGSCI (rh3.oracle.com) 4> stop replicat rep1
Sending STOP request to REPLICAT REP1 ...
Request processed.
GGSCI (rh3.oracle.com) 5> start replicat rep1
Sending START request to MANAGER ...
REPLICAT REP1 starting
接下来我们要具体测试多种 DDL 语句的 gg 同步情况:
SQL> create user guser identified by guser;
User created.
源端的$ORACLE_BASE/admin/$SID/udump 下的 ggs_ddl_trace.log,纪录了该 create user ddl 语句:
Start of log for DDL sequence [137], v[ $Id:
//depot/releases/OpenSys/v11.1.1.0/redist/SQLScripts
/ddl_setup.sql#2 $ ] trace level [0], owner schema of DDL package [MACLEAN], objtype
[USER] name [.GUSER]
SESS 4294967295-2010-12-07 22:21:06 : DDLTRACE1 : Before Trigger: point in execution =
[1.0], objtype [USER] name [.GUSER]
SESS 4294967295-2010-12-07 22:21:06 : DDL : DDL operation [create user guser identified
by ***** ]
, sequence [137], DDL type [CREATE] USER, real object type [USER], va
lidity [], object ID [], object [.GUSER], real object [.GUSER], base object schema [],
base object name [], logged as [SYS]
SESS 4294967295-2010-12-07 22:21:06 : DDL : Start SCN found [45484306]
End of log for DDL sequence [137], no DDL history metadata recorded for this DDL
operation
目标端同步情况:
SQL> select username from dba_users where created>=all(select created from dba_users);
17. USERNAME
------------------------------
GUSER
/* 可以看到 create user 语句复制成功 */
SQL> show parameter db_create_file_dest
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest string /s01/10gdb/oradata
SQL> create tablespace gtb datafile size 10M;
Tablespace created.
SQL> show parameter db_create_file_dest
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest string /s01/oradata
SQL> select file_name from dba_data_files where tablespace_name='GTB';
FILE_NAME
--------------------------------------------------------------------------------
/s01/oradata/CLINICB/datafile/o1_mf_gtb_6hxjpstg_.dbf
/* 在远端和目标端都启用了 10g 中自动管理数据文件创建的前提下,
创建表空间的 DDL 语句被复制成功
*/
/* 若我们在源端创建某表,且为该表指定一个目标端不存在的表空间时,
create table 语句会如何呢?
*/
SQL> conn sender/sender
Connected.
SQL> create table rbf (t1 int) tablespace bf;
Table created.
可以在目标端的 replicat report 中看到以下 4 次尝试,其后三次应为我们之前定义的 MAXRETRIES:
2010-12-08 07:37:43 INFO OGG-01407 Setting current schema for DDL operation to
[RECEIVER].
18. 2010-12-08 07:37:48 INFO OGG-01407 Setting current schema for DDL operation to
[RECEIVER].
2010-12-08 07:37:53 INFO OGG-01407 Setting current schema for DDL operation to
[RECEIVER].
2010-12-08 07:37:58 INFO OGG-01407 Setting current schema for DDL operation to
[RECEIVER].
2010-12-08 07:37:58 INFO OGG-01408 Restoring current schema for DDL operation to
[MACLEAN].
GGSCI (rh3.oracle.com) 21> stats replicat rep1
Sending STATS request to REPLICAT REP1 ...
No active replication maps
DDL replication statistics:
*** Total statistics since replicat started ***
Operations 4.00
Mapped operations 2.00
Unmapped operations 0.00
Other operations 2.00
Excluded operations 0.00
Errors 8.00
Retried errors 6.00
Discarded errors 0.00
Ignored errors 2.00
/* 虽然可以从 stats replicat 的输出中看到 Errors 和 Retried errors 数,
但在 replicat 的 report 和 ggserr 日志中都没有纪录 DDL 同步失败的具体信息,准备提 SR 了!
*/
/* 在源端创建以下简单的存储过程 */
SQL> conn sender/sender
SQL> create or replace procedure progg as
2 i int;
3 begin
4 select t1 into i from tddl where rownum=1;
5 dbms_output.put_line(i);
6 end;
7 /
Procedure created.
19. SQL> conn receiver/receiver
Connected.
SQL> select t1 from tddl;
T1
----------
1
2
SQL> set serveroutput on;
SQL> exec progg;
1
PL/SQL procedure successfully completed.
/* 因为目标端存在该存储过程的依赖条件,所以复制后编译成功;
否则复制可以成功但该对象状态为 INVALID */
SQL> drop procedure progg;
Procedure dropped.
SQL> drop table tddl;
Table dropped.
在源端再次创建该 procedure 后:
SQL> col object_name for a30
SQL> select object_name,status from dba_objects where object_name='PROGG';
OBJECT_NAME STATUS
------------------------------ -------
PROGG INVALID
/* 在源端创建 profile 配置文件 */
SQL> create profile gg_profile limit sessions_per_user 2;
Profile created.
SQL> select RESOURCE_NAME,LIMIT from dba_profiles where profile='GG_PROFILE' and limit!
='DEFAULT';
RESOURCE_NAME LIMIT
-------------------------------- ----------------------------------------
SESSIONS_PER_USER 2
20. /*在目标端配置文件信息同步成功 */
/* 在源端创建文件夹 directory 对象 */
SQL> create directory dgg as '/s01/dump';
Directory created.
SQL> col directory_name for a3
SQL> col directory_path for a20
SQL> select directory_name,directory_path from dba_directories where
directory_name='DGG';
DIR DIRECTORY_PATH
--- --------------------
DGG /s01/dump
/*在文件系统上都存在/s01/dump 文件夹的前提下 create directory ddl 同步成功*/
/*在源端创建 type 为 oracle_datapump 的外部表 */
SQL> CREATE TABLE extgg
2 ORGANIZATION EXTERNAL
3 (TYPE oracle_datapump
4 DEFAULT DIRECTORY dgg
5 LOCATION ('extgg.dat'))
6 AS
7 select * from dba_objects;
Table created.
在目标端 replicat 中出现多次 retry 纪录:
2010-12-08 08:13:09 INFO OGG-01407 Setting current schema for DDL operation to
[RECEIVER].
2010-12-08 08:13:14 INFO OGG-01407 Setting current schema for DDL operation to
[RECEIVER].
2010-12-08 08:13:19 INFO OGG-01407 Setting current schema for DDL operation to
[RECEIVER].
2010-12-08 08:13:24 INFO OGG-01407 Setting current schema for DDL operation to
[RECEIVER].
2010-12-08 08:13:24 INFO OGG-01408 Restoring current schema for DDL operation to
[MACLEAN].
/* 同时 ddl Errors 数目增加 */
GGSCI (rh3.oracle.com) 34> stats replicat rep1
Sending STATS request to REPLICAT REP1 ...
21. No active replication maps
DDL replication statistics:
*** Total statistics since replicat started ***
Operations 11.00
Mapped operations 6.00
Unmapped operations 0.00
Other operations 5.00
Excluded operations 0.00
Errors 33.00
Retried errors 24.00
Discarded errors 0.00
Ignored errors 9.00
/* 无疑是创建外部表的 DDL 语句复制失败,当因为目前找不到相关的日志所以无法进一步分析了 */
在配置 GoldenGate 同步 DDL 语句(2)中我们针对多种 DDL 语句在 GoldenGate 环境中的同步进行了测试,但在
默认情况下 replicat 在复制 DDL 语句失败时不会在 replicat report 或者 ggserr.log 等日志文件中产生该 DDL 失败
的具体信息,这就会导致我们在发现 DDL 同步有 error 的情况下无法了解失败的原因。之后又去翻官方的文档,
在中找到了 DDLOPTIONS 参数:
Use the DDLOPTIONS parameter to configure aspects of DDL processing other than filtering
and string substitution. You can use multiple DDLOPTIONS statements, but using one is
recommended. If using multiple DDLOPTIONS statements, make each of them unique so that
one does not override the other. Multiple DDLOPTIONS statements are executed in the order
listed.
这个参数可用的选项很多,我们需要用到的是 REPORT 选项:
Valid for Extract and Replicat (Oracle and Teradata).
Controls whether or not expanded DDL processing
information is written to the report file. The default of
NOREPORT reports basic DDL statistics. REPORT adds the
parameters being used and a step-by-step history of the
operations that were processed