【OGG】OGG的单向复制配置-支持DDL(二)

【OGG】OGG的单向复制配置-支持DDL(二)

一.1  BLOG文档结构图

 

 

 

一.2  前言部分

 

一.2.1  导读

各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~:

① OGG的单向DDL实时复制功能

 

 

注意:本篇BLOG中代码部分需要特别关注的地方我都用黄色背景和红色字体来表示,比如下边的例子中,thread 1的最大归档日志号为33,thread 2的最大归档日志号为43是需要特别关注的地方。

  List of Archived Logs in backup set 11

  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time

  ---- ------- ---------- ------------------- ---------- ---------

  1    32      1621589    2015-05-29 11:09:52 1625242    2015-05-29 11:15:48

  1    33      1625242    2015-05-29 11:15:48 1625293    2015-05-29 11:15:58

  2    42      1613951    2015-05-29 10:41:18 1625245    2015-05-29 11:15:49

  2    43      1625245    2015-05-29 11:15:49 1625253    2015-05-29 11:15:53

 

 

 

 

 

本文如有错误或不完善的地方请大家多多指正,ITPUB留言或QQ皆可,您的批评指正是我写作的最大动力。

一.2.2  实验环境介绍

 


项目


source db


target  db


db 类型


单实例


单实例


db version


11.2.0.3


11.2.0.3


db 存储


FS type


FS type


ORACLE_SID


ogg1


ogg2


db_name


ogg1


ogg2


主机IP地址:


192.168.59.129


192.168.59.130


OS版本及kernel版本


RHEL6.5 64位,2.6.32-504.16.2.el6.x86_64


RHEL6.5 64位,2.6.32-504.16.2.el6.x86_64


OGG版本


11.2.1.0.1 64位


11.2.1.0.1 64位


OS hostname


orcltest


rhel6_lhr

 

 

 

一.2.3  相关参考文章链接

 

【OGG】OGG的下载和安装篇:http://blog.itpub.net/26736162/viewspace-1693241/

【OGG】OGG的单向DML复制配置(一):http://blog.itpub.net/26736162/viewspace-1696020/

 

 

 

一.2.4  本文简介

 

 

本文基于OGG的DML复制功能,加上DDL复制功能,后续会推出系列的OGG配置,包括双向复制,还有rac到单实例的复制等等,主要参考网址为:http://ylw6006.blog.51cto.com/all/470441/16 ,非常感谢斩月大师。

 

 

 

 

 

一.3  实验部分

 

一.3.1  实验目标

 

配置2台服务器,搭建OGG,实现hr用户下的数据ddl和DML复制功能。

 

 

 

一.3.2  先验证之前的配置不支持DDL复制

 

验证之前的配置不支持DDL复制,这里在source端,新建一张表,发现无法复制到target端!target端也新建相同的表后,DML操作可以成功复制。

 

[oracle@orcltest ~]$ sqlplus hr/hr@ogg1

 

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jun 10 16:18:03 2015

 

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

 

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

SQL> create table t2 (id number primary key,name varchar2(20)); 

 

Table created.

 

SQL> conn hr/hr@ogg2

Connected.

SQL> select tname from tab where tname='T2'; 

 

no rows selected

 

SQL> create table t2 (id number primary key,name varchar2(20)); 

 

Table created.

 

SQL>  conn hr/hr@ogg1

Connected.

SQL>  insert into t2 values (1,'one'); 

 

1 row created.

 

SQL> commit;

 

Commit complete.

 

SQL> conn hr/hr@ogg2

Connected.

SQL> select * from t2;

 

        ID NAME

---------- --------------------

         1 one

 

SQL>

 

此时source库:

GGSCI (orcltest) 26> dblogin userid ggusr@ogg1,password lhr

Successfully logged into database.

 

GGSCI (orcltest) 29> info trandata hr.t2

 

Logging of supplemental redo log data is disabled for table HR.T2.

 

GGSCI (orcltest) 30>

 

 

 

一.3.3  开始配置OGG支持DDL复制(在source端操作)

 

 

 

一.3.3.1  赋予ggusr用户相应的权限,修改全局配置文件添加ggschema参数

[oracle@orcltest ~]$ sqlplus sys/lhr@ogg1 as  sysdba

 

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jun 10 16:27:05 2015

 

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

 

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

SQL>  grant execute on utl_file to ggusr;

 

Grant succeeded.

 

SQL>

 

 

[oracle@orcltest gg11]$ ggsci

 

Oracle GoldenGate Command Interpreter for Oracle

Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO

Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:32:14

 

Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.

 

 

 

GGSCI (orcltest) 1> edit param ./GLOBALS 

GGSCHEMA ggusr

~

~

~

~

。。。。。。。。。。。。。。。

~

~

~

~

"./GLOBALS" 1L, 15C written

 

 

GGSCI (orcltest) 2> view param ./GLOBALS

 

GGSCHEMA ggusr

 

 

GGSCI (orcltest) 3>

 

一.3.3.2  运行相关的sql脚本

如果想使用DDL功能,需要在之前运行支持DDL的相关脚本。

1.@marker_setup.sql

2.@ddl_setup.sql

3.@role_setup.sql

4.GRANT GGS_GGSUSER_ROLE TO gguser

5.@ddl_enable.sql

6.@?/rdbms/admin/dbmspool.sql 

7.@ddl_pin.sql ggusr

 

 

[oracle@orcltest gg11]$ sqlplus sys/lhr@ogg1 as  sysdba

 

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jun 10 16:30:45 2015

 

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

 

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

SQL> @marker_setup.sql

 

Marker setup script

 

You will be prompted for the name of a schema for the Oracle GoldenGate database objects.

NOTE: The schema must be created prior to running this script.

NOTE: Stop all DDL replication before starting this installation.

 

Enter Oracle GoldenGate schema name:ggusr

 

 

Marker setup table script complete, running verification script...

Please enter the name of a schema for the GoldenGate database objects:

Setting schema name to GGUSR

 

MARKER TABLE

-------------------------------

OK

 

MARKER SEQUENCE

-------------------------------

OK

 

Script complete.

 

 

SQL> @ddl_setup.sql

 

Oracle GoldenGate DDL Replication setup script

 

Verifying that current user has privileges to install DDL Replication...

 

You will be prompted for the name of a schema for the Oracle 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 Oracle GoldenGate schema name:ggusr

 

Working, please wait ...

Spooling to file ddl_setup_spool.txt

 

Checking for sessions that are holding locks on Oracle Golden Gate metadata tables ...

 

Check complete.

 

 

 

 

 

 

 

Using GGUSR as a Oracle GoldenGate schema name.

 

Working, please wait ...

 

DDL replication setup script complete, running verification script...

Please enter the name of a schema for the GoldenGate database objects:

Setting schema name to GGUSR

 

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

 

DDLREPLICATION PACKAGE STATUS:

 

Line/pos             Error

-------------------- -----------------------------------------------------------------

No errors            No errors

 

DDLREPLICATION PACKAGE BODY STATUS:

 

Line/pos             Error

-------------------- -----------------------------------------------------------------

No errors            No errors

 

DDL IGNORE TABLE

-----------------------------------

OK

 

DDL IGNORE LOG TABLE

-----------------------------------

OK

 

DDLAUX  PACKAGE STATUS:

 

Line/pos             Error

-------------------- -----------------------------------------------------------------

No errors            No errors

 

DDLAUX PACKAGE BODY STATUS:

 

Line/pos             Error

-------------------- -----------------------------------------------------------------

No errors            No errors

 

SYS.DDLCTXINFO  PACKAGE STATUS:

 

Line/pos             Error

-------------------- -----------------------------------------------------------------

No errors            No errors

 

SYS.DDLCTXINFO  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

 

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

------------------------------------------------------------------------------------------------------------------------

/u02/app/oracle/diag/rdbms/ogg1/ogg1/trace/ggs_ddl_trace.log

 

Analyzing installation status...

 

 

STATUS OF DDL REPLICATION

------------------------------------------------------------------------------------------------------------------------

SUCCESSFUL installation of DDL Replication software components

 

Script complete.

SQL>  @role_setup.sql

 

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 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:ggusr

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.

SQL> grant ggs_ggsuser_role to ggusr;

 

Grant succeeded.

 

SQL> @ddl_enable.sql

 

Trigger altered.

 

SQL> @?/rdbms/admin/dbmspool.sql 

 

Package created.

 

 

Grant succeeded.

 

SQL>  @ddl_pin.sql ggusr

 

PL/SQL procedure successfully completed.

 

 

PL/SQL procedure successfully completed.

 

 

PL/SQL procedure successfully completed.

 

SQL>

 

/u02/app/oracle/diag/rdbms/ogg1/ogg1/trace/ggs_ddl_trace.log 为DDL语句的日志。

 

一.3.4  source端修改extract进程的params文件,添加"ddl include all"参数,重启extract进程

 

GGSCI (orcltest) 1> info all

 

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

 

MANAGER     RUNNING                                          

EXTRACT     RUNNING     EORA_HR     00:00:27      00:00:08   

EXTRACT     RUNNING     PORA_HR     00:00:00      00:00:02   

 

 

 

 

GGSCI (orcltest) 4> edit params eora_hr

extract eora_hr

setenv (ORACLE_SID=ogg1)

setenv (ORACLE_HOME=/u02/app/oracle/product/11.2.0/dbhome_1)

setenv (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)

ddl include all

userid ggusr,password lhr

exttrail ./dirdat/hr

table hr.*;

~

~

~

~

~

。。。。。。。。。。。。

~

~

~

~

~

~

~

~

"dirprm/eora_hr.prm" 8L, 229C written

 

 

GGSCI (orcltest) 5> view params eora_hr

 

extract eora_hr 

setenv (ORACLE_SID=ogg1)

setenv (ORACLE_HOME=/u02/app/oracle/product/11.2.0/dbhome_1)

setenv (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK) 

ddl include all

userid ggusr,password lhr

exttrail ./dirdat/hr 

table hr.*;

 

 

GGSCI (orcltest) 6> stop eora_hr

 

Sending STOP request to EXTRACT EORA_HR ...

Request processed.

 

 

GGSCI (orcltest) 7> start eora_hr

 

Sending START request to MANAGER ...

EXTRACT EORA_HR starting

 

 

GGSCI (orcltest) 8> info all

 

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

 

MANAGER     RUNNING                                          

EXTRACT     RUNNING     EORA_HR     00:00:00      00:00:07   

EXTRACT     RUNNING     PORA_HR     00:00:00      00:00:09   

 

 

GGSCI (orcltest) 9>

GGSCI (orcltest) 9> view report EORA_HR

 

 

***********************************************************************

                 Oracle GoldenGate Capture for Oracle

    Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO

   Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:42:16

 

Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.

 

 

                    Starting at 2015-06-10 16:41:04

***********************************************************************

 

Operating System Version:

Linux

Version #1 SMP Sun Nov 10 22:19:54 EST 2013, Release 2.6.32-431.el6.x86_64

Node: orcltest

Machine: x86_64

                         soft limit   hard limit

Address Space Size   :    unlimited    unlimited

Heap Size            :    unlimited    unlimited

File Size            :    unlimited    unlimited

CPU Time             :    unlimited    unlimited

 

Process id: 22734

 

Description:

 

***********************************************************************

**            Running with the following parameters                  **

***********************************************************************

 

2015-06-10 16:41:04  INFO    OGG-03035  Operating system character set identified as UTF-8. Locale: en_US, LC_ALL:.

extract eora_hr

setenv (ORACLE_SID=ogg1)

Set environment variable (ORACLE_SID=ogg1)

setenv (ORACLE_HOME=/u02/app/oracle/product/11.2.0/dbhome_1)

Set environment variable (ORACLE_HOME=/u02/app/oracle/product/11.2.0/dbhome_1)

setenv (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)

Set environment variable (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)

ddl include all

userid ggusr,password ***

exttrail ./dirdat/hr

table hr.*;

 

2015-06-10 16:41:04  INFO    OGG-01815  Virtual Memory Facilities for: BR

    anon alloc: mmap(MAP_ANON)  anon free: munmap

    file alloc: mmap(MAP_SHARED)  file free: munmap

    target directories:

    /u01/gg11/BR/EORA_HR.

 

Bounded Recovery Parameter:

BRINTERVAL = 4HOURS

BRDIR      = /u01/gg11

 

2015-06-10 16:41:04  INFO    OGG-01815  Virtual Memory Facilities for: COM

    anon alloc: mmap(MAP_ANON)  anon free: munmap

    file alloc: mmap(MAP_SHARED)  file free: munmap

    target directories:

    /u01/gg11/dirtmp.

 

CACHEMGR virtual memory values (may have been adjusted)

CACHESIZE:                               64G

CACHEPAGEOUTSIZE (normal):                8M

PROCESS VM AVAIL FROM OS (min):         128G

CACHESIZEMAX (strict force to disk):     96G

 

Database Version:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

PL/SQL Release 11.2.0.3.0 - Production

CORE    11.2.0.3.0      Production

TNS for Linux: Version 11.2.0.3.0 - Production

NLSRTL Version 11.2.0.3.0 - Production

 

Database Language and Character Set:

NLS_LANG         = "AMERICAN_AMERICA.ZHS16GBK"

NLS_LANGUAGE     = "AMERICAN"

NLS_TERRITORY    = "AMERICA"

NLS_CHARACTERSET = "ZHS16GBK"

 

2015-06-10 16:41:04  WARNING OGG-01423  No valid default archive log destination directory found for thread 1.

 

2015-06-10 16:41:04  INFO    OGG-01513  Positioning to Sequence 8, RBA 4283920, SCN 0.1107430.

 

2015-06-10 16:41:04  INFO    OGG-01516  Positioned to Sequence 8, RBA 4283920, SCN 0.1107430, Jun 10, 2015 4:40:34 PM.

 

2015-06-10 16:41:04  INFO    OGG-01055  Recovery initialization completed for target file ./dirdat/hr000001, at RBA 1076.

 

2015-06-10 16:41:04  INFO    OGG-01478  Output file ./dirdat/hr is using format RELEASE 11.2.

 

2015-06-10 16:41:04  INFO    OGG-01026  Rolling over remote file ./dirdat/hr000001.

 

2015-06-10 16:41:04  INFO    OGG-01053  Recovery completed for target file ./dirdat/hr000002, at RBA 1076.

 

2015-06-10 16:41:04  INFO    OGG-01057  Recovery completed for all targets.

 

***********************************************************************

**                     Run Time Messages                             **

***********************************************************************

 

 

2015-06-10 16:41:04  INFO    OGG-01517  Position of first record processed Sequence 8, RBA 4283920, SCN 0.1107430, Jun 10, 2015 4:40:34 PM.

 

 

GGSCI (orcltest) 10>

GGSCI (orcltest) 10> info extract eora_hr

 

EXTRACT    EORA_HR   Last Started 2015-06-10 16:41   Status RUNNING

Checkpoint Lag       00:00:00 (updated 00:00:04 ago)

Log Read Checkpoint  Oracle Redo Logs

                     2015-06-10 16:42:16  Seqno 8, RBA 4302848

                     SCN 0.1107495 (1107495)

 

 

GGSCI (orcltest) 11>

 

 

 

一.3.5  target端修改replicat进程的params文件,添加"ddl include all"和"ddlerror default ignore retryop maxretries 3 retrydelay 5" 参数,重启replicat进程

[oracle@rhel6_lhr gg11]$ ggsci

 

Oracle GoldenGate Command Interpreter for Oracle

Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO

Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:32:14

 

Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.

 

 

 

GGSCI (rhel6_lhr) 1> info all

 

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

 

MANAGER     RUNNING                                          

REPLICAT    RUNNING     RORA_HR     00:00:00      00:00:07   

 

 

GGSCI (rhel6_lhr) 2> edit params rora_hr

 

 

 

GGSCI (rhel6_lhr) 3> view params rora_hr

 

replicat rora_hr

setenv (ORACLE_SID=ogg2)

setenv (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)

setenv (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)

ddl include all 

ddlerror default ignore retryop maxretries 3 retrydelay 5

userid ggusr,password lhr 

handlecollisions 

assumetargetdefs 

discardfile ./dirrpt/rora_hr.dsc,purge 

map hr.* ,target hr.*;

 

 

GGSCI (rhel6_lhr) 4> stop rora_hr

 

Sending STOP request to REPLICAT RORA_HR ...

Request processed.

 

 

GGSCI (rhel6_lhr) 5> start rora_hr

 

Sending START request to MANAGER ...

REPLICAT RORA_HR starting

 

 

GGSCI (rhel6_lhr) 6> info all

 

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

 

MANAGER     RUNNING                                          

REPLICAT    RUNNING     RORA_HR     00:00:00      00:00:06   

 

 

GGSCI (rhel6_lhr) 7>

 

GGSCI (rhel6_lhr) 7> info replicat rora_hr

 

REPLICAT   RORA_HR   Last Started 2015-06-10 02:39   Status RUNNING

Checkpoint Lag       00:00:00 (updated 00:00:08 ago)

Log Read Checkpoint  File ./dirdat/pa000000

                     First Record  RBA 7200161

 

 

GGSCI (rhel6_lhr) 8>

 

 

一.3.6  测试

 

[oracle@orcltest ~]$ sqlplus hr/hr@ogg1

 

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jun 10 16:47:12 2015

 

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

 

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

SQL> alter table t2 add location varchar2(200); 

 

Table altered.

 

SQL> conn hr/hr@ogg2

Connected.

SQL> desc t2 

Name                                      Null?    Type

----------------------------------------- -------- ----------------------------

ID                                        NOT NULL NUMBER

NAME                                               VARCHAR2(20)

LOCATION                                           VARCHAR2(200)

 

SQL> conn hr/hr@ogg1

Connected.

SQL> create table t3 as select object_id,object_name from dba_objects; 

 

Table created.

 

SQL> select count(1) from t3;

 

  COUNT(1)

----------

     75262

 

 

SQL> conn hr/hr@ogg2

Connected.

SQL> select tname from tab where tname='T3'; 

 

TNAME

------------------------------

T3

 

SQL> select count(1) from t3;

 

  COUNT(1)

----------

     75217

 

 

 

 

可以看到DDL语句已经执行了,我们看看DDL语句的日志:

SESS 380011-2015-06-10 16:47:19 : DDL : ************************* Start of log for DDL sequence [14], v[ $Id: ddl_setup.sql /st_oggcore_11.2.1/8 2012/04/02 11:11:33 smijatov Exp $ ] trace level [0], owner schema of DDL package [GGUSR], objtype [TABLE] name [HR.T2]

SESS 380011-2015-06-10 16:47:19 : DDLTRACE1 : Before Trigger: point in execution = [1.0], objtype [TABLE] name [HR.T2]

SESS 380011-2015-06-10 16:47:19 : DDL : DDL operation [alter table t2 add location varchar2(200) ], sequence [14], DDL type [ALTER] TABLE, real object type [TABLE], validity [VALID], object ID [76836], object [HR.T2], real object [HR.T2], base object schema [], base object name [], logged as [HR]

SESS 380011-2015-06-10 16:47:19 : DDL : Start SCN found [1107605]

SESS 380011-2015-06-10 16:47:20 : DDL : ------------------------- End of log for DDL sequence [14]

 

SESS 390002-2015-06-10 16:48:14 : DDL : ************************* Start of log for DDL sequence [501], v[ $Id: ddl_setup.sql /st_oggcore_11.2.1/8 2012/04/02 11:11:33 smijatov Exp $ ] trace level [0], owner schema of DDL package [GGUSR], objtype [TABLE] name [HR.T3]

SESS 390002-2015-06-10 16:48:14 : DDLTRACE1 : Before Trigger: point in execution = [1.0], objtype [TABLE] name [HR.T3]

SESS 390002-2015-06-10 16:48:14 : DDL : DDL operation [create table t3 as select object_id,object_name from dba_objects ], sequence [501], DDL type [CREATE] TABLE, real object type [TABLE], validity [], object ID [], object [HR.T3], real object [HR.T3], base object schema [], base object name [], logged as [HR]

SESS 390002-2015-06-10 16:48:14 : DDL : Start SCN found [1107994]

SESS 390002-2015-06-10 16:48:14 : DDL : ------------------------- End of log for DDL sequence [501]

 

 

 

一.3.7  实验总结

 

DDL复制,我们可以从日志看出其执行的SQL语句,若DML配置熟悉的话,DDL配置就很简单了。

 

 

一.4  About Me

 

...........................................................................................................................................................................................

本文作者:小麦苗,只专注于数据库的技术,更注重技术的运用

ITPUB BLOG:http://blog.itpub.net/26736162

本文地址:http://blog.itpub.net/26736162/viewspace-1696031/

本文pdf版:http://yunpan.cn/QCwUAI9bn7g7w  提取码:af2d

QQ:642808185 若加QQ请注明你所正在读的文章标题

创作时间地点:2015-06-10 09:00~ 2015-06-10 19:00 于外汇交易中心

...........................................................................................................................................................................................

 

 

时间: 2024-10-11 10:59:36

【OGG】OGG的单向复制配置-支持DDL(二)的相关文章

Oracle的OGG单向复制配置

实验环境: 源端: Ip:192.168.40.10 DataBase:Oracle 11.2.0.1.0 ORCL OS:OEL5.6 OGG:fbo_ggs_Linux_x86_ora11g_32bit 目标端: Ip:192.168.40.128 DataBase:10.2.0.1.0  ORCL OS:OEL5.6 OGG:fbo_ggs_Linux_x86_ora11g_32bit 首先配置好两台机子上的环境变量,在其中增加以下内容并使之生效: export GGATE=$ORACLE

环境-Apache 配置支持 PHP 错误

问题描述 Apache 配置支持 PHP 错误 要在win7中配PHP的环境,配置Apache支持PHP的时候遇到 修改 httpd.conf 步骤添加附件代码后重启Apache失败,初学PHP不知道问题错在哪里,请指教 附件: php5 support LoadModule php5_module D:/php/php5apache2_4.dll AddType application/x-httpd-php .php .html .htm configure the path to php.

PHP IDE PHPStorm配置支持友好Laravel代码提示方法

  这篇文章主要介绍了PHP IDE PHPStorm配置支持友好Laravel代码提示方法,重点配置已经加红提示,需要的朋友可以参考下 PHPStorm神器可以支持更友好的laravel框架代码提示(点击查看),只需要执行如下才做: 第一步:在项目的composer.json中添加如下一行 代码如下: "require": { "laravel/framework": "5.0.*", "barryvdh/laravel-ide-he

Notepad++ 配置 支持jquery、html、css、javascript、php代码提示

原文:Notepad++ 配置 支持jquery.html.css.javascript.php代码提示 官网下载:http://notepad-plus-plus.org/ 获取插件的方法:打开软件,窗口工具栏有有一个问号,点获取插件. 我使用的插件(安装方法都是官方的方法): QuickText.v0.2.1.zip      //自定义缩写词,按快捷键后输出 定义的代码段   使用方法:http://immmmm.com/quicktext-for-notepad.html 安装方法: J

iis6下配置支持.net4.0&发布网站[转]

iis6配置支持.net4.0 在win2003操作系统上发布两个网站,首先配置iis: 1.下载 .net framework 4.0   差不多48MB 2.安装 3.打开iis: 开始=>管理工具=>Internet 信息服务(IIS)管理器 4.点击管理器中的"web服务扩展",刚刚安装的.net framework 4.0 就会出现在右边,选择并允许 这样就配置好了 有时还要同时配置.net framework 3.5和.net framework 4.0 才可以

oracle ogg同步部分列配置教程详解

oracle ogg是什么   Oracle Golden Gate软件是一种基于日志的结构化数据复制备份软件,它通过解析源数据库在线日志或归档日志获得数据的增量变化,再将这些变化应用到目标数据库,从而实现源数据库与目标数据库同步.Oracle Golden Gate可以在异构的IT基础结构(包括几乎所有常用操作系统平台和数据库平台)之间实现大量数据亚秒一级的实时复制,从而在可以在应急系统.在线报表.实时数据仓库供应.交易跟踪.数据同步.集中/分发.容灾.数据库升级和移植.双业务中心等多个场景下

TOMCAT+JIVE的安装配置(支持中文)

中文 0.已经安装了APACHE及JDK.否则安装之.本机安装版本为apache1.3,JDK为1.3.1(不能使用JDK1.4.0,因为在后面JIVE的安装中在编译一个JAVA文件的时候会遇到类申明重叠的问题,缘于jdk1.4.0的java.sql包和java.beans包都包含类Statement,而在jdk1.3.1中,java.beans包不包含Statement类,而该文件导入包的方式为: import java.sql.*; import java.beans.*;) 1.下载TOM

WIN7系统JavaEE(tomcat7 Eclipse)环境配置教程(二)_java

在进行Java Web环境开发之前,首先要做的第一件事就是搭建开发环境,开发环境搭建成功,接下来便是对整个开发环境进行测试,可以通过编写一个简单的JSP程序发布到Tomcat应用服务器上运行. 本文重点介绍Tomcat配置过程,具体内容如下 1.下载Tomcat7.0;下载地址:http://tomcat.apache.org/download-70.cgi:根据自己系统下载相应版本. 2.把下载的压缩包,解压到某硬盘根目录,我解压到D盘根目录. 3.配置Tomcat环境变量: 右击[我的电脑]

日志服务(原SLS)新功能发布(9)--Logtail配置支持主题(Topic)设置功能

日志服务中日志为日志服务中处理的最小数据单元,采用半结构化数据模式定义一条日志,具体数据模型包括主题(Topic).时间(Time).内容(Content)和来源(Source),详细描述请参考核心概念.其中主题(Topic)为用户自定义字段,用以标记一批日志(例如:访问日志根据不同站点进行标记),默认值为空字符串(空字符串也为一个有效的主题).用户可以通过使用REST API/SDK上传数据时设置主题.除此之外,Logtail客户端为日志服务用户常用的数据接入客户端,目前也支持设置使用不同的属