卸载goldengate相关配置信息
Oracle GoldenGate软件基于数据库日志结构变化,通过解析源端在线日志或归档日志获得数据增量,再将这些变化传输并应用到目标数据库,从而实现源库和目标库的数据同步
卸载goldengate,需要停止gg相关的所有服务,删除gg所有文件所在的目录,然后删除数据库中相关的记录。
一,在源端,停止extract和管理服务:
GGSCI (rac1) 1> info all
Program Status Group Lag Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:09
GGSCI (rac1) 2> stop ext1
Sending STOP request to EXTRACT EXT1 ...
Request processed.
GGSCI (rac1) 3> 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.
GGSCI (rac1) 4> info all
Program Status Group Lag Time Since Chkpt
MANAGER STOPPED
EXTRACT STOPPED EXT1 00:00:00 00:00:42
二,在目标端,停止replicat和管理服务:
GSCI (redhat6) 6> info all
Program Status Group Lag Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING REP1 00:00:00 00:00:09
GGSCI (redhat6) 7> stop rep1
Sending STOP request to REPLICAT REP1 ...
Request processed.
GGSCI (redhat6) 8> 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.
GGSCI (redhat6) 9> info all
Program Status Group Lag Time Since Chkpt
MANAGER STOPPED
REPLICAT STOPPED REP1 00:00:00 00:00:17
三,删除源数据库中的用户:
SQL> drop user gg cascade;
drop user gg cascade
*
第 1 行出现错误:
ORA-00604: 递归 SQL 级别 2 出现错误
ORA-20782: GoldenGate DDL Replication Error: Code :ORA-20782: Cannot DROP
object used in GoldenGate replication while trigger is enabled. Consult
GoldenGate documentation and/or call GoldenGate Technical Support if you wish
to do so., error stack: ORA-06512: 在 line 203
ORA-06512: 在 line 915
SQL> drop trigger ggs_ddl_trigger_before;
触发器已删除。
SQL> drop user gg cascade;
用户已删除。
SQL> drop user ggs cascade;
用户已删除。
四,删除目标数据库中的用户:
SQL> drop trigger ggs_ddl_trigger_before;
触发器已删除。
SQL> drop user gg cascade;
用户已删除。
SQL> drop user ggt cascade;
用户已删除。
五,删除gg所在目录,至此gg完全删除。