shareplex 8.6.6 filter ddl 测试

[BEGIN] 2017/4/9 13:43:20
SQL> show user;
USER is "SPLEX"
SQL>  desc shareplex_ddl_control;
Name                                           Null?    Type
----------------------------------------- -------- ----------------------------
DDL_PARAMETER                                            NUMBER
DDL_CODE                                            NUMBER
SCHEMA_FILTER                                            VARCHAR2(32)
OBJECT_FILTER                                            VARCHAR2(32)




SQL> select * from shareplex_ddl_control;

no rows selected

SQL>
SQL>
SQL>


SQL> insert into shareplex_ddl_control values (1,null,null,null);

1 row created.

SQL> commit;

Commit complete.

SQL> select * from shareplex_ddl_control;

DDL_PARAMETER        DDL_CODE SCHEMA_FILTER
------------- ---------- --------------------------------
OBJECT_FILTER
--------------------------------
            1



SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@node1 ~]$ sp_ctrl


*******************************************************
* SharePlex for Oracle Command Utility
* Copyright 2016 Quest Software Inc.
* ALL RIGHTS RESERVED.
* Protected by U.S. Patents: 7,461,103 and 7,065,538
*******************************************************

sp_ctrl (node1:2100)>
sp_ctrl (node1:2100)> status

Brief Status for node1
Process          State                             PID     Running   Since     
---------------  ------------------------------  --------  --------------------
Cop              Running                             2594  09-Apr-17 01:41:44  
Capture          Running                             2599  09-Apr-17 01:42:07  
Read             Running                             2606  09-Apr-17 01:42:10  
Export           Running                             2617  09-Apr-17 01:42:26  
Cmd & Ctrl       Running                             2661  09-Apr-17 01:51:31  

System is used as a source machine
There is 1 active configuration file

sp_ctrl (node1:2100)>
sp_ctrl (node1:2100)>
sp_ctrl (node1:2100)> exit
[oracle@node1 ~]$ ssh node2
oracle@node2's password:
Last login: Fri Apr  7 01:32:43 2017 from node1
[oracle@node2 ~]$ sp_ctrl


*******************************************************
* SharePlex for Oracle Command Utility
* Copyright 2016 Quest Software Inc.
* ALL RIGHTS RESERVED.
* Protected by U.S. Patents: 7,461,103 and 7,065,538
*******************************************************

sp_ctrl (node2:2100)> status

Brief Status for node2
Process          State                             PID     Running   Since     
---------------  ------------------------------  --------  --------------------
Cop              Running                             2573  09-Apr-17 01:41:51  
Import           Running                             2588  09-Apr-17 01:42:26  
Post             Running                             2579  09-Apr-17 01:42:24  
Cmd & Ctrl       Running                             2576  09-Apr-17 01:41:54  
Cmd & Ctrl       Running                             2661  09-Apr-17 01:51:43  
There are no active configuration files

sp_ctrl (node2:2100)>
sp_ctrl (node2:2100)>
sp_ctrl (node2:2100)>
sp_ctrl (node2:2100)>
sp_ctrl (node2:2100)>
sp_ctrl (node2:2100)>
sp_ctrl (node2:2100)> exit
[oracle@node2 ~]$
[oracle@node2 ~]$
[oracle@node2 ~]$ exit
logout
Connection to node2 closed.
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$ sp_ctrl


*******************************************************
* SharePlex for Oracle Command Utility
* Copyright 2016 Quest Software Inc.
* ALL RIGHTS RESERVED.
* Protected by U.S. Patents: 7,461,103 and 7,065,538
*******************************************************

sp_ctrl (node1:2100)> view config test_config

#datasource.SOURCE_SID

#source tables      target tables           routing map

#splex.demo_src      splex.demo_dest             target_system@o.target_sid


datasource.orcl

expand source.%        target.%                  node2@o.orcl
expand hr.%            hr.%                      node2@o.orcl

sp_ctrl (node1:2100)>
sp_ctrl (node1:2100)>
sp_ctrl (node1:2100)> exit

[oracle@node1 ~]$ sqlplus  /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Sun Apr 9 01:53:07 2017

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

SQL> connect /as sysDBA
Connected.
SQL> alter user scott identified by oracle account unlock;

User altered.

SQL> connect scott/oracle
Connected.
SQL> create table t5(id int primary key);

Table created.

SQL>
SQL>
SQL>
SQL> insert into t5 values (5);

1 row created.

SQL> commit;

Commit complete.

SQL> select count(*) from t5;

  COUNT(*)
----------
         1

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$ ssh node2
oracle@node2's password:
Last login: Sun Apr  9 01:51:39 2017 from node1

[oracle@node2 ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Sun Apr 9 01:55:01 2017

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

SQL> connect /as sysdba
Connected.
SQL> alter user scott identified by oracle account unlock;

User altered.

SQL> connect scott/oracle
Connected.
SQL> select tname from tab;

TNAME
------------------------------
BONUS
DEPT
EMP
SALGRADE

SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@node2 ~]$ sp_ctrl


*******************************************************
* SharePlex for Oracle Command Utility
* Copyright 2016 Quest Software Inc.
* ALL RIGHTS RESERVED.
* Protected by U.S. Patents: 7,461,103 and 7,065,538
*******************************************************

sp_ctrl (node2:2100)> show sql
Last SQL statement of queue node1 and instance o.orcl-o.orcl on node2



sp_ctrl (node2:2100)> status

Brief Status for node2
Process          State                             PID     Running   Since     
---------------  ------------------------------  --------  --------------------
Cop              Running                             2573  09-Apr-17 01:41:51  
Import           Running                             2588  09-Apr-17 01:42:26  
Post             Running                             2579  09-Apr-17 01:42:24  
Cmd & Ctrl       Running                             2576  09-Apr-17 01:41:54  
Cmd & Ctrl       Running                             2704  09-Apr-17 01:55:39  
There are no active configuration files

sp_ctrl (node2:2100)> exit
[oracle@node2 ~]$ exit
logout
Connection to node2 closed.
[oracle@node1 ~]$ sqlplus hr/hr

SQL*Plus: Release 11.2.0.4.0 Production on Sun Apr 9 01:55:54 2017

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options




SQL> create table t5 (id int primary key);

Table created.

SQL> insert into t5 values (5);

1 row created.

SQL> commit;

Commit complete.

SQL> select count(*) from t5;

  COUNT(*)
----------
         1

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@node1 ~]$ ssh node2
oracle@node2's password:
Last login: Sun Apr  9 01:54:46 2017 from node1
[oracle@node2 ~]$ sqlplus hr/hr

SQL*Plus: Release 11.2.0.4.0 Production on Sun Apr 9 01:56:44 2017

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select tname from tab;

TNAME
------------------------------
ADMIN_DOCINDEX
CLOB1
COUNTRIES
DDD
DEPARTMENTS
EMPLOYEES
EMP_DETAILS_VIEW
EMP_LOG
JOBS
JOB_HISTORY
LOCATIONS

TNAME
------------------------------
OLTPCOMP
PEOPLE
PERSONNEL
RAWWW
REGIONS
ROWID_CONTENT
SYS_IOT_OVER_88721
T5
TEST
TTTT
VIEW_EMP

22 rows selected.

SQL> select count(*) from t5;

  COUNT(*)
----------
         1

SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@node2 ~]$
[oracle@node2 ~]$
[oracle@node2 ~]$
[oracle@node2 ~]$
[oracle@node2 ~]$ exit
logout
Connection to node2 closed.
[oracle@node1 ~]$ sp_ctrl


*******************************************************
* SharePlex for Oracle Command Utility
* Copyright 2016 Quest Software Inc.
* ALL RIGHTS RESERVED.
* Protected by U.S. Patents: 7,461,103 and 7,065,538
*******************************************************

sp_ctrl (node1:2100)> status

Brief Status for node1
Process          State                             PID     Running   Since     
---------------  ------------------------------  --------  --------------------
Cop              Running                             2594  09-Apr-17 01:41:44  
Capture          Running                             2599  09-Apr-17 01:42:07  
Read             Running                             2606  09-Apr-17 01:42:10  
Export           Running                             2617  09-Apr-17 01:42:26  
Cmd & Ctrl       Running                             2706  09-Apr-17 01:57:19  

System is used as a source machine
There is 1 active configuration file

sp_ctrl (node1:2100)> exit
[oracle@node1 ~]$ ssh node2
oracle@node2's password:
Last login: Sun Apr  9 01:56:40 2017 from node1
[oracle@node2 ~]$ sp_ctrl


*******************************************************
* SharePlex for Oracle Command Utility
* Copyright 2016 Quest Software Inc.
* ALL RIGHTS RESERVED.
* Protected by U.S. Patents: 7,461,103 and 7,065,538
*******************************************************



sp_ctrl (node2:2100)> show sql
Last SQL statement of queue node1 and instance o.orcl-o.orcl on node2

   Thread    Session
   ------    -------
        0          0
/
   Thread is initializing : No SQL available yet.


   Thread    Session
   ------    -------
        3          4
/
   insert into "HR"."T5" ("ID") values (:V001)


   Thread    Session
   ------    -------
        2          7
/
   CREATE TABLE "HR"."T5" (id int primary key)




sp_ctrl (node2:2100)>
sp_ctrl (node2:2100)>
sp_ctrl (node2:2100)>
sp_ctrl (node2:2100)> exit
[oracle@node2 ~]$
[oracle@node2 ~]$
[oracle@node2 ~]$ exit
logout
Connection to node2 closed.
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$ #########cancel filter ddl
[oracle@node1 ~]$ sqlplus splex/splex

SQL*Plus: Release 11.2.0.4.0 Production on Sun Apr 9 01:58:20 2017

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select count(*) from shareplex_ddl_control;

  COUNT(*)
----------
         1

SQL> select * from shareplex_ddl_control;

DDL_PARAMETER        DDL_CODE SCHEMA_FILTER
------------- ---------- --------------------------------
OBJECT_FILTER
--------------------------------
            1



SQL> delete from shareplex_ddl_control;

1 row deleted.

SQL> commit;

Commit complete.

SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$ sqlplus scott/oracle

SQL*Plus: Release 11.2.0.4.0 Production on Sun Apr 9 01:59:19 2017

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select tname from tab;

TNAME
------------------------------
BONUS
DEPT
EMP
SALGRADE
T5

SQL> create table t6(id int primary key);

Table created.

SQL> insert into t6 values (6);

1 row created.

SQL> commit;

Commit complete.

SQL> select tname from tab;

TNAME
------------------------------
BONUS
DEPT
EMP
SALGRADE
T5
T6

6 rows selected.

SQL> select count(*) from t6;

  COUNT(*)
----------
         1

SQL>
SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$ ssh node2
oracle@node2's password:
Last login: Sun Apr  9 01:57:36 2017 from node1
[oracle@node2 ~]$ sp_ctrl


*******************************************************
* SharePlex for Oracle Command Utility
* Copyright 2016 Quest Software Inc.
* ALL RIGHTS RESERVED.
* Protected by U.S. Patents: 7,461,103 and 7,065,538
*******************************************************

sp_ctrl (node2:2100)> show sql
Last SQL statement of queue node1 and instance o.orcl-o.orcl on node2

   Thread    Session
   ------    -------
        0          0
/
   Thread is initializing : No SQL available yet.


   Thread    Session
   ------    -------
        4          1
/
   create table t6(id int primary key)


   Thread    Session
   ------    -------
        3          4
/
   insert into "HR"."T5" ("ID") values (:V001)


   Thread    Session
   ------    -------
        2          7
/
   CREATE TABLE "HR"."T5" (id int primary key)




sp_ctrl (node2:2100)> exit
[oracle@node2 ~]$ sqlplus scott/oracle

SQL*Plus: Release 11.2.0.4.0 Production on Sun Apr 9 02:00:32 2017

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select tname from tab;

TNAME
------------------------------
BONUS
DEPT
EMP
SALGRADE
T6

SQL> select count(*) from t6;

  COUNT(*)
----------
         0

SQL>
SQL>
SQL>

[END] 2017/4/9 14:01:14
标签: 暂无标签
dongxujian

写了 86 篇文章,拥有财富 384,被 13 人关注

转播转播 分享分享 分享淘帖
回复

使用道具

您需要登录后才可以回帖 登录 | 加入社区

本版积分规则

意见
反馈