【GoldenGate】Oracle GoldenGate(三) DDL同步配置

海星星hktk發表於2014-10-06

Oracle GoldenGate DDL同步配置


在上一篇博文中實驗已經配置好了OGG的DML雙向同步。下面是在此基礎上配置增加DDL的同步配置。


[
專案環境]

Item

Primary System

Secondary System

Platform

RHEL5.5

RHEL5.5

Hostname

lvxinghao1

lvxinghao2

Database

Oracle10.2.0.1

Oracle 10.2.0.1

Character Set

ZHS16GBK

ZHS16GBK

ORACLE_SID

prod

test1

Listener Name/Port

LISTENER/1521

LISTENER/1521

Goldengate User

ogg

ogg


[
實施步驟]

1       Execute DDL sync scripts in two systems

先進入goldengate軟體安裝目錄,以SYSDBA身份登入oracle執行以下指令碼,執行指令碼過程中,需要輸入的使用者全部是ogg,安裝模式為INITIALSETUP,如果資料字典或者某些內部的包有錯誤,則需要執行catalog.sqlcatproc.sql指令碼。

如果某項指令碼執行錯誤,需要重新執行時,先要執行清除的指令碼:ddl_remove.sqlmarker_remove.sql

1.1     Execute DDL sync scripts in Primary system prod

1.1.1  get into goldengate directory

[oracle@lvxinghao1 ~]$ cd /u01/app/ogg

[oracle@lvxinghao1 ogg]$ sqlplus '/as sysdba'

1.1.2  @marker_setup

SYS@ prod>@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:ogg

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

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

Setting schema name to OGG                    

MARKER TABLE

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

OK

MARKER SEQUENCE

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

OK

Script complete.

1.1.3  @ddl_setup

SYS@ prod>alter system set recyclebin='off' scope=both;

SYS@ prod>show parameter recyclebin

NAME                                 TYPE        VALUE

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

recyclebin                           string      off

 

SYS@ prod>@ddl_setup

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 GoldenGate database objects.

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

NOTE: On Oracle 10g and up, system recycle bin must be disabled.

NOTE: Stop all DDL replication before starting this installation.

Enter GoldenGate schema name:ogg

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 OGG 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.

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 OGG

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

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

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

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

/u01/app/oracle/admin/prod/udump/ggs_ddl_trace.log

Analyzing installation status...

STATUS OF DDL REPLICATION

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

SUCCESSFUL installation of DDL Replication software components

Script complete.

 

 

1.1.4  @role_setup

SYS@ prod>@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 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:ogg

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.

 

 

1.1.5  grant GGS_GGSUSER_ROLE TO ogg;

SYS@ prod>grant GGS_GGSUSER_ROLE TO ogg;

Grant succeeded.

SUCCESSFUL installation of DDL Replication software components

Script complete.

 

 

1.1.6  @ddl_enable

SYS@ prod>@ddl_enable

Trigger altered.

 

1.2     Execute DDL sync scripts in Secondary system test1

1.2.1  get into goldengate directory

[oracle@lvxinghao2 ~]$ cd /u01/app/ogg

[oracle@lvxinghao2 ogg]$ sqlplus '/as sysdba'

1.2.2  @marker_setup

SYS@ test1> @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:ogg

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

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

Setting schema name to OGG                    

MARKER TABLE

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

OK

MARKER SEQUENCE

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

OK

Script complete.

1.2.3  @ddl_setup

SYS@ test1>alter system set recyclebin='off' scope=both;

SYS@ test1>show parameter recyclebin

 

NAME                                 TYPE        VALUE

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

recyclebin                           string      off

SYS@ test1>@ddl_setup

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 GoldenGate database objects.

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

NOTE: On Oracle 10g and up, system recycle bin must be disabled.

NOTE: Stop all DDL replication before starting this installation.

Enter GoldenGate schema name:ogg

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 OGG 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.

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 OGG

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

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

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

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

/u01/app/oracle/admin/ test1/udump/ggs_ddl_trace.log

Analyzing installation status...

STATUS OF DDL REPLICATION

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

SUCCESSFUL installation of DDL Replication software components

Script complete.

 

 

1.2.4  @role_setup

SYS@ test1> @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 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:ogg

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.

 

 

1.2.5  grant GGS_GGSUSER_ROLE TO ogg;

SYS@ test1> grant GGS_GGSUSER_ROLE TO ogg;

Grant succeeded.

SUCCESSFUL installation of DDL Replication software components

Script complete.

 

 

1.2.6  @ddl_enable

SYS@ test1> @ddl_enable

Trigger altered.

 

 

2       Edit extract process parameter s in two systems

先關閉eora_1eora_2程式,eora_1eora_2配置檔案中新增以下一行,然後重新啟動:

DDL INCLUDE OBJNAME "scott.*"

      

 

2.1     Log into database

GGSCI (lvxinghao2) 39> DBLOGIN USERID ogg, PASSWORD ogg

Successfully logged into database.

 

2.2     Edit extract process EORA_1 parameter

Stop extract process

GGSCI (lvxinghao1) 21> stop extract eora_1

Sending STOP request to EXTRACT EORA_1 ...

Request processed.

 

Edit extract process EORA_1 parameter

GGSCI (lvxinghao1) 22> edit params eora_1

-- Change Capture parameter file to capture

--scott.* changes

EXTRACT EORA_1

SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)

USERID ogg, PASSWORD ogg

TRANLOGOPTIONS EXCLUDEUSER ogg

DDL INCLUDE OBJNAME "scott.*"

EXTTRAIL ./dirdat/aa

TABLE scott.*;

 

Start extract process EORA_1

GGSCI (lvxinghao1) 24> start extract eora_1

Sending START request to MANAGER ...

EXTRACT EORA_1 starting

 

Verify

GGSCI (lvxinghao1) 25> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING                                          

EXTRACT     RUNNING     EORA_1      00:02:27      00:00:02   

EXTRACT     RUNNING     PORA_1      00:00:00      00:00:07   

REPLICAT    RUNNING     RORA_2      00:00:00      00:00:06

 

2.3     Edit extract process EORA_2 parameter

Stop extract process

GGSCI (lvxinghao2) 23> stop extract eora_2

Sending STOP request to EXTRACT EORA_2 ...

Request processed.

Edit extract process EORA_2 parameter

GGSCI (lvxinghao2) 24> edit params eora_2

-- Change Capture parameter file to capture

--scott.* changes

EXTRACT EORA_2

SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)

USERID ogg, PASSWORD ogg

TRANLOGOPTIONS EXCLUDEUSER ogg

DDL INCLUDE OBJNAME "scott.*"

EXTTRAIL ./dirdat/ab

TABLE scott.*;

 

Start extract process

GGSCI (lvxinghao2) 25> start extract eora_2

Sending START request to MANAGER ...

EXTRACT EORA_2 starting

 

Verify

GGSCI (lvxinghao2) 26> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING                                          

EXTRACT     RUNNING     EORA_2      00:01:00      00:00:02   

EXTRACT     RUNNING     PORA_2      00:00:00      00:00:08   

REPLICAT    RUNNING     RORA_1      00:00:00      00:00:09

 

3       Edit Delivery process parameter in two systems

配置REPLICAT程式引數檔案,新增以下幾行到rora_1/rora_2配置檔案中:

DDL INCLUDE ALL

DDLERROR DEFAULT IGNORE RETRYOP MAXRETRIES 3 RETRYDELAY 5

DDLERROR DEFAULT DISCARD

DDLERROR DEFAULT IGNORE RETRYOP

3.1     Edit replicat process RORA_1 parameter:

Stop Replicat process:

GGSCI (lvxinghao2) 28> stop replicat rora_1

Sending STOP request to REPLICAT RORA_1 ...

Request processed.

 

Edit replicat process RORA_1 parameter

GGSCI (lvxinghao2) 29> edit params rora_1

-- Change Delivery parameter file to apply

-- lvxinghao Changes

REPLICAT RORA_1

SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)

USERID ogg, PASSWORD ogg

HANDLECOLLISIONS

ASSUMETARGETDEFS

DISCARDFILE ./dirrpt/RORA_aa.DSC, PURGE

DDL INCLUDE ALL

DDLERROR DEFAULT IGNORE RETRYOP MAXRETRIES 3 RETRYDELAY 5

DDLERROR DEFAULT DISCARD

DDLERROR DEFAULT IGNORE RETRYOP

MAP scott.*, TARGET scott.*;

 

Start Replicat process:

GGSCI (lvxinghao2) 30> start replicat rora_1

Sending START request to MANAGER ...

REPLICAT RORA_1 starting

 

Verify

GGSCI (lvxinghao2) 31> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING                                          

EXTRACT     RUNNING     EORA_2      00:00:00      00:00:07   

EXTRACT     RUNNING     PORA_2      00:00:00      00:00:09   

REPLICAT    RUNNING     RORA_1      00:00:00      00:00:03 

 

 

 

Edit replicat process RORA_1 parameter:

GGSCI (lvxinghao2) 4> EDIT PARAM RORA_1

Add:

--

-- Change Delivery parameter file to apply

-- lvxinghao Changes

--

REPLICAT RORA_1

SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)

USERID ogg, PASSWORD ogg

HANDLECOLLISIONS

ASSUMETARGETDEFS

DISCARDFILE ./dirrpt/RORA_aa.DSC, PURGE

MAP scott.lvxinghao, TARGET scott.lvxinghao;

Note: In the MAP statement, the first owner/schema is for the source and the second for the target.

Start Replicat process:

GGSCI (lvxinghao2) 5> START REPLICAT RORA_1

Sending START request to MANAGER ...

REPLICAT RORA_1 starting

Verify:

GGSCI (lvxinghao2) 6> info replicat rora_1

 

REPLICAT   RORA_1    Last Started 2014-09-13 21:09   Status RUNNING

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

Log Read Checkpoint  File ./dirdat/pa000000

                     First Record  RBA 0

 

3.2     Edit replicat process RORA_2 parameter:

Stop Replicat process:

GGSCI (lvxinghao1) 28> stop replicat rora_2

Sending STOP request to REPLICAT RORA_2 ...

Request processed.

 

Edit replicat process RORA_2 parameter

GGSCI (lvxinghao1) 31> edit params rora_2

-- Change Delivery parameter file to apply

-- lvxinghao Changes

REPLICAT RORA_2

SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)

USERID ogg, PASSWORD ogg

HANDLECOLLISIONS

ASSUMETARGETDEFS

DISCARDFILE ./dirrpt/RORA_ab.DSC, PURGE

DDL INCLUDE ALL

DDLERROR DEFAULT IGNORE RETRYOP MAXRETRIES 3 RETRYDELAY 5

DDLERROR DEFAULT DISCARD

DDLERROR DEFAULT IGNORE RETRYOP

MAP scott.*, TARGET scott.*;

 

Start Replicat process:

GGSCI (lvxinghao1) 32> start replicat rora_2

Sending START request to MANAGER ...

REPLICAT RORA_2 starting

 

Verify

GGSCI (lvxinghao1) 33> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING                                           

EXTRACT     RUNNING     EORA_1      00:00:00      00:00:08   

EXTRACT     RUNNING     PORA_1      00:00:00      00:00:05   

REPLICAT    RUNNING     RORA_2      00:00:00      00:00:02

 

 

4       Verify if DDL/DML can be duplicated correctly

4.1     DDL:Create table operation

4.1.1  create test table in test1

SCOTT@ test1>create table beyond as select * from emp;

Table created.

SCOTT@ test1>alter table beyond add constraint beyond_empno_pk primary key(empno);

Table altered.

4.1.2  verify in prod

SCOTT@ prod>select * from tab;

TNAME                          TABTYPE  CLUSTERID

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

DEPT                           TABLE

BONUS                          TABLE

EMP                            TABLE

SALGRADE                       TABLE

EMP2                           TABLE

LVXINGHAO                      TABLE

BEYOND                         TABLE

 

 

SCOTT@ prod>SELECT I.INDEX_NAME,I.index_TYPE,C.COLUMN_NAME

  2  FROM USER_INDEXES I,USER_IND_COLUMNS C

  3  WHERE I.TABLE_NAME='BEYOND'

  4  AND I.INDEX_NAME=C.INDEX_NAME;

INDEX_NAME           INDEX_TYPE COLUMN_NAME

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

BEYOND_EMPNO_PK      NORMAL     EMPNO

test1端建立新表、新增主鍵約束。在prod端檢視已經同步。

4.2     Enable transaction data change capture for the new table

GGSCI (lvxinghao1) 49> info trandata scott.beyond

Logging of supplemental redo log data is disabled for table SCOTT.BEYOND.

 

GGSCI (lvxinghao2) 48> info trandata scott.beyond

Logging of supplemental redo log data is disabled for table SCOTT.BEYOND.

 

4.2.1  stop replicat

GGSCI (lvxinghao2) 49> stop replicat rora_1

Sending STOP request to REPLICAT RORA_1 ...

Request processed.

GGSCI (lvxinghao1) 50> stop replicat rora_2

Sending STOP request to REPLICAT RORA_2 ...

Request processed.

 

 

4.2.2  add trandata

GGSCI (lvxinghao2) 50> add trandata scott.beyond

Logging of supplemental redo data enabled for table SCOTT.BEYOND.

GGSCI (lvxinghao1) 51> add trandata scott.beyond

Logging of supplemental redo data enabled for table SCOTT.BEYOND.

 

4.2.3  start replicat

GGSCI (lvxinghao1) 52> start replicat rora_2

Sending START request to MANAGER ...

REPLICAT RORA_2 starting

 

GGSCI (lvxinghao2) 51> start replicat rora_1

Sending START request to MANAGER ...

REPLICAT RORA_1 starting

4.2.4  verify

GGSCI (lvxinghao1) 53> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING                                          

EXTRACT     RUNNING     EORA_1      00:00:00      00:00:07    

EXTRACT     RUNNING     PORA_1      00:00:00      00:00:07   

REPLICAT    RUNNING     RORA_2      00:00:00      00:00:02

GGSCI (lvxinghao2) 52> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING                                           

EXTRACT     RUNNING     EORA_2      00:00:00      00:00:06   

EXTRACT     RUNNING     PORA_2      00:00:00      00:00:09   

REPLICAT    RUNNING     RORA_1      00:00:00      00:00:09  

 

4.3     DML:Update operations on the new created table

4.3.1  update operation on scott.beyond

SCOTT@ test1>update beyond set ename='DAMON' where empno=7788;

SCOTT@ test1>commit;

4.3.2  check on prod

SCOTT@ prod>select * from beyond;

 EMPNO ENAME   JOB          MGR HIREDATE               SAL   COMM  DEPTNO

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

  7788 DAMON   ANALYST     7566 1987-04-19 00:00:00   3000             20

  7839 KING    PRESIDENT        1981-11-17 00:00:00   5000             10

  7844 TURNER  SALESMAN    7698 1981-09-08 00:00:00   1500      0      30

  7876 ADAMS   CLERK       7788 1987-05-23 00:00:00   1100             20

  7900 JAMES   CLERK       7698 1981-12-03 00:00:00    950             30

  7902 FORD    ANALYST     7566 1981-12-03 00:00:00   3000             20

  7934 MILLER  CLERK       7782 1982-01-23 00:00:00   1300             10

  7369 SMITH   CLERK       7902 1980-12-17 00:00:00    800             20

  7499 ALLEN   SALESMAN    7698 1981-02-20 00:00:00   1600    300      30

  7521 WARD    SALESMAN    7698 1981-02-22 00:00:00   1250    500      30

  7566 JONES   MANAGER     7839 1981-04-02 00:00:00   2975             20

  7654 MARTIN  SALESMAN    7698 1981-09-28 00:00:00   1250   1400      30

  7698 BLAKE   MANAGER     7839 1981-05-01 00:00:00   2850             30

  7782 CLARK   MANAGER     7839 1981-06-09 00:00:00   2450             10

14 rows selected.

test1上對scott.beyond表進行update操作,在prod端檢視已經同步。

4.4     DDL:Drop the new created table

4.4.1  drop the new created table on prod

SCOTT@ prod>drop table beyond;

Table dropped.

4.4.2  verify on test1

SCOTT@ test1>select * from tab;

TNAME                          TABTYPE  CLUSTERID

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

DEPT                           TABLE

EMP                            TABLE

BONUS                          TABLE

SALGRADE                       TABLE

LVXINGHAO                      TABLE

EMP2                           TABLE

6 rows selected.

prod上刪除scott.beyond表後,在test1上檢視,此表也已經被刪除。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29475508/viewspace-1290169/,如需轉載,請註明出處,否則將追究法律責任。

相關文章