Optional Auto-Add support for Oracle DDL
1.确认相关参数设置:
[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)> list param
Analyze parameters:
Parameter Name Actual Value Units Set At
Capture parameters:
Parameter Name Actual Value Units Set At
------------------------------ ------------------------------------ ------- ---------------
SP_OCT_ARCH_LOC Live
SP_OCT_ASM_USE_OCI 0 boolean Restart Process
SP_OCT_AUTOADD_ENABLE 1 boolean Restart Process ##################################
SP_OCT_AUTOADD_MVIEW 0 boolean Restart Process
SP_OCT_AUTOADD_SEQ 0 boolean Restart Process ##################################
2.设置相关参数:
sp_ctrl (node1:2100)> set param SP_OCT_AUTOADD_SEQ 1
sp_ctrl (node1:2100)> status
Brief Status for node1
Process State PID Running Since
--------------- ------------------------------ -------- --------------------
Cop Running 2593 06-Apr-17 21:54:52
Capture Running 2597 06-Apr-17 21:55:31
Read Running 2603 06-Apr-17 21:55:34
Export Running 2621 06-Apr-17 21:57:18
Cmd & Ctrl Running 2625 06-Apr-17 21:58:33
System is used as a source machine
There is 1 active configuration file
3.重启源端进程:
sp_ctrl (node1:2100)> stop capture
sp_ctrl (node1:2100)> stop read
sp_ctrl (node1:2100)> stop export
sp_ctrl (node1:2100)> start capture
sp_ctrl (node1:2100)> start read
sp_ctrl (node1:2100)> start export
4.检查参数修改是否生效:
sp_ctrl (node1:2100)> list param
Capture parameters:
Parameter Name Actual Value Units Set At
------------------------------ ------------------------------------ ------- ---------------
SP_OCT_ARCH_LOC Live
SP_OCT_ASM_USE_OCI 0 boolean Restart Process
SP_OCT_AUTOADD_ENABLE 1 boolean Restart Process
SP_OCT_AUTOADD_MVIEW 0 boolean Restart Process
SP_OCT_AUTOADD_SEQ 1 boolean Restart Process
Default Value: 0
5.测试:
[oracle@node1 ~]$ sqlplus source/source
SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 6 22:04:25 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 sequence seq1;
Sequence created.
SQL> desc user_sequences;
Name Null? Type
----------------------------------------- -------- ----------------------------
SEQUENCE_NAME NOT NULL VARCHAR2(30)
MIN_VALUE NUMBER
MAX_VALUE NUMBER
INCREMENT_BY NOT NULL NUMBER
CYCLE_FLAG VARCHAR2(1)
ORDER_FLAG VARCHAR2(1)
CACHE_SIZE NOT NULL NUMBER
LAST_NUMBER NOT NULL NUMBER
SQL> select sequence_name from user_sequences;
SEQUENCE_NAME
------------------------------
SEQ1
SQL> select seq1.nextval from dual;
NEXTVAL
----------
1
SQL> /
NEXTVAL
----------
2
SQL> /
NEXTVAL
----------
3
SQL> /
NEXTVAL
----------
4
SQL> /
NEXTVAL
----------
5
SQL> /
NEXTVAL
----------
6
SQL> /
NEXTVAL
----------
7
SQL> /
NEXTVAL
----------
8
SQL> /
NEXTVAL
----------
9
SQL> /
NEXTVAL
----------
10
SQL> /
NEXTVAL
----------
11
SQL> /
NEXTVAL
----------
12
SQL> /
NEXTVAL
----------
13
SQL> /
NEXTVAL
----------
14
SQL> /
NEXTVAL
----------
15
SQL> /
NEXTVAL
----------
16
SQL> /
NEXTVAL
----------
17
SQL> /
NEXTVAL
----------
18
SQL> /
NEXTVAL
----------
19
SQL> /
NEXTVAL
----------
20
SQL> /
NEXTVAL
----------
21
SQL> /
NEXTVAL
----------
22
SQL> /
NEXTVAL
----------
23
SQL> /
NEXTVAL
----------
24
SQL> /
NEXTVAL
----------
25
SQL> /
NEXTVAL
----------
26
SQL> /
NEXTVAL
----------
27
SQL>
目标端:
SQL> show user;
USER is "TARGET"
SQL> select sequence_name from user_sequences;
SEQUENCE_NAME
------------------------------
SEQ1
SQL> select seq1.nextval from dual;
NEXTVAL
----------
21
SQL> /
NEXTVAL
----------
22
SQL> /
NEXTVAL
----------
23
SQL> /
NEXTVAL
----------
24
SQL> /
NEXTVAL
----------
25
SQL> /
NEXTVAL
----------
26
SQL> /
NEXTVAL
----------
27
SQL> /
NEXTVAL
----------
48
SQL> exit
|
|