Linux下解除安裝GoldenGate

zhenghaishu發表於2015-08-27

Linux下解除安裝GoldenGate

1 開啟終端,進入GoldenGate安裝目錄

$ cd /u01/ogg

 

2 進入GoldenGate環境

$ ./ggsci

 

Oracle GoldenGate Command Interpreter for Oracle

Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO

Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:32:14

 

Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.

 

 

 

GGSCI (localhost) 1>

 

3 停止所有的管理、抽取、複製程式

GGSCI (localhost) 1> info all

 

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

 

MANAGER     STOPPED                                          

EXTRACT     STOPPED     EXT_L       00:00:00      00:23:49   

REPLICAT    STOPPED     REP_L       00:00:00      00:23:52   

 

 

GGSCI (localhost) 2>

上圖表示三個程式都已經停止了。

假如有程式還處於running狀態,則可用stop命令來停止。

例子:stop ext_lstop rep_l, stop mgr

 

4 退出GoldenGate環境

GGSCI (localhost) 2> exit

[oracle@localhost ogg]$

 

5 執行SQL*Plus,並用具有SYSDBA許可權的使用者登入

[oracle@localhost ogg]$ sqlplus / as sysdba

 

SQL*Plus: Release 11.2.0.1.0 Production on 星期三 7 29 11:28:14 2015

 

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

 

 

連線到:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

SQL>

 

6 斷開產生過DDL的所有會話,包括GoldenGate程式、SQL*Plus、業務應用、以及其他任何使用Oracle的軟體。否則資料庫可能會報ORA-04021的錯誤

 

7 執行ddl_disabl.sql指令碼來禁用DDL觸發器

SQL> @ddl_disable

 

觸發器已更改

 

SQL>

 

8 執行ddl_remove.sql指令碼來移除GoldenGate DDL觸發器、DDL歷史和標記表以及其他相關的物件。這個指令碼會生成一個ddl_remove_spool.txt檔案,記錄了指令碼的輸出,還有一個ddl_remove_set.txt檔案,記錄了當前的使用者環境設定,以防debug之用。

SQL> @ddl_remove

 

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:ogg

Working, please wait ...

Spooling to file ddl_remove_spool.txt

 

Script complete.

SQL>

 

9 執行marker_remove.sql指令碼來移除GoldenGate marker支援系統。這個指令碼生成一個marker_remove_spool.txtmarker_remove_set.txt檔案,作用和上面的相同

SQL> @ddl_remove

 

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:ogg

Working, please wait ...

Spooling to file ddl_remove_spool.txt

 

Script complete.

SQL> @marker_remove

 

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:ogg

 

PL/SQL 過程已成功完成。

 

 

序列已刪除。

 

 

表已刪除。

 

 

Script complete.

SQL>

 

10 刪除GoldenGate使用者

SQL> drop user ogg cascade;

 

使用者已刪除。

 

SQL>

 

11 刪除ogg目錄

SQL> exit

[oracle@localhost ogg]$ cd ..

[oracle@localhost u01]$ remove -rf ogg

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

相關文章