美文网首页Oracle ...
Oracle GoldenGate 之 Oracle 取消DDL

Oracle GoldenGate 之 Oracle 取消DDL

作者: fordZrx | 来源:发表于2019-02-19 17:46 被阅读4次

    1、打开cmd.exe,进入GoldenGate安装目录,运行ggsci.exe

    C:\windows\system32>d:
    D:\>cd D:\OGG\oggoracle
    D:\OGG\oggoracle>ggsci.exe
    

    2、关闭运行中的进程

    GGSCI (DESKTOP-LDTMM0I) 1> info all
    Program     Status      Group       Lag at Chkpt  Time Since Chkpt
    MANAGER     RUNNING
    EXTRACT     RUNNING     EORA        00:00:00      00:00:02
    EXTRACT     RUNNING     PUMP_SO     00:00:00      00:00:06
    
    GGSCI (DESKTOP-LDTMM0I) 2> stop pump_so
    Sending STOP request to EXTRACT PUMP_SO ...
    Request processed.
    
    GGSCI (DESKTOP-LDTMM0I) 3> stop eora
    Sending STOP request to EXTRACT EORA ...
    Request processed.
    
    GGSCI (DESKTOP-LDTMM0I) 4> stop mgr
    Manager process is required by other GGS processes.
    Are you sure you want to stop it (y/n)? y
    Sending STOP request to MANAGER ...
    Request processed.
    Manager stopped.
    

    3、退出ggsci.exe,从ogg目录进入 sqlplus

    D:\OGG\oggoracle>sqlplus "/as sysdba"
    
    SQL*Plus: Release 11.2.0.1.0 Production on 星期二 2月 19 17:34:37 2019
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    连接到:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL>
    

    4、运行ddl_disable.sql脚本来禁用DDL触发器

    SQL> @ddl_disable.sql
    触发器已更改
    

    5、运行ddl_remove.sql脚本来移除GoldenGate DDL触发器、DDL历史和标记表以及其他相关的对象。
    注意:Enter Oracle GoldenGate schema name:处输入DDL信息所在用户

    SQL> @ddl_remove.sql
    DDL replication removal script.
    WARNING: this script removes all DDL replication objects and data.
    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.
    Enter Oracle GoldenGate schema name:ggs
    Working, please wait ...
    Spooling to file ddl_remove_spool.txt
    Script complete.
    

    6、运行marker_remove.sql脚本来移除GoldenGate marker支持系统。

    SQL> @marker_remove.sql
    Marker removal script.
    WARNING: this script removes all marker objects and data.
    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.
    Enter Oracle GoldenGate schema name:ggs
    PL/SQL 过程已成功完成。
    序列已删除。
    表已删除。
    Script complete.
    

    7、如果用户是专门用来存放DDL信息的,可以删除用户

    SQL> drop user ggs cascade;
    用户已删除
    

    相关文章

      网友评论

        本文标题:Oracle GoldenGate 之 Oracle 取消DDL

        本文链接:https://www.haomeiwen.com/subject/cdpfyqtx.html