OGG常用命令(十)–ALLOWNESTED

使用ALLOWNESTED和NOALLOWNESTED 命令启用或禁用嵌套OBEY文件的使用。嵌套 OBEY文件是包含另一个OBEY文件的文件,请参见OBEY。

语法:
ALLOWNESTED | NOALLOWNESTED

ALLOWNESTED
启用嵌套OBEY文件的使用。没有最大数量的嵌套文件。

NOALLOWNESTED
这是默认值。尝试OBEY在默认模式下运行嵌套 文件 NOALLOWNESTED将导致错误。

举例:

[weblogic@oracle11g ogg]$ cat obey
info all
view params EXTKAFKA
obey ./obey1

GGSCI (oracle11g as ogg@orcl) 44> obey ./obey

GGSCI (oracle11g as ogg@orcl) 45> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED                                           
EXTRACT     STOPPED     EXTKAFKA    00:00:00      23:12:08    
EXTRACT     STOPPED     FINANCE     00:00:00      24:24:32    
EXTRACT     STOPPED     PUKAFKA     00:00:00      2165:47:42  
EXTRACT     STOPPED     TEST1       00:00:00      24:21:49    
EXTRACT     STOPPED     TEST2       00:00:00      24:14:57    
EXTRACT     STOPPED     TEST3       00:00:00      24:14:46    

GGSCI (oracle11g as ogg@orcl) 46> view params EXTKAFKA

EXTRACT extkafka
SETENV (ORACLE_HOME="/u01/app/oracle/product/11.2.0.4/db_1")
SETENV (ORACLE_SID="orcl")
SETENV (NLS_LANG="AMERICAN_AMERICA.AL32UTF8")
USERID ogg,PASSWORD ogg
EXTTRAIL ./dirdat/gs
TABLE TEST1.TEST;

GGSCI (oracle11g as ogg@orcl) 47> obey ./obey1

ERROR: Nested OBEY scripts not allowed. Use ALLOWNESTED to allow nested scripts.

GGSCI (oracle11g as ogg@orcl) 48> ALLOWNESTED
Nested OBEY scripts allowed.

GGSCI (oracle11g as ogg@orcl) 49> obey ./obey

GGSCI (oracle11g as ogg@orcl) 50> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED                                           
EXTRACT     STOPPED     EXTKAFKA    00:00:00      23:13:22    
EXTRACT     STOPPED     FINANCE     00:00:00      24:25:47    
EXTRACT     STOPPED     PUKAFKA     00:00:00      2165:48:56  
EXTRACT     STOPPED     TEST1       00:00:00      24:23:03    
EXTRACT     STOPPED     TEST2       00:00:00      24:16:12    
EXTRACT     STOPPED     TEST3       00:00:00      24:16:01    

GGSCI (oracle11g as ogg@orcl) 51> view params EXTKAFKA

EXTRACT extkafka
SETENV (ORACLE_HOME="/u01/app/oracle/product/11.2.0.4/db_1")
SETENV (ORACLE_SID="orcl")
SETENV (NLS_LANG="AMERICAN_AMERICA.AL32UTF8")
USERID ogg,PASSWORD ogg
EXTTRAIL ./dirdat/gs
TABLE TEST1.TEST;

GGSCI (oracle11g as ogg@orcl) 52> obey ./obey1

**** Halting script [./obey], starting script [./obey1]...

GGSCI (oracle11g as ogg@orcl) 53> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED                                           
EXTRACT     STOPPED     EXTKAFKA    00:00:00      23:13:25    
EXTRACT     STOPPED     FINANCE     00:00:00      24:25:50    
EXTRACT     STOPPED     PUKAFKA     00:00:00      2165:48:59  
EXTRACT     STOPPED     TEST1       00:00:00      24:23:06    
EXTRACT     STOPPED     TEST2       00:00:00      24:16:15    
EXTRACT     STOPPED     TEST3       00:00:00      24:16:04    

GGSCI (oracle11g as ogg@orcl) 54> info TEST1

EXTRACT    TEST1     Initialized   2020-11-30 16:32   Status STOPPED
Checkpoint Lag       00:00:00 (updated 24:23:07 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2020-11-30 16:32:05  Seqno 0, RBA 0
                     SCN 0.0 (0)

GGSCI (oracle11g as ogg@orcl) 55> **** Terminating script [./obey1], resuming script [./obey]...

Related Posts