GoldenGate software can be uninstalled using the deinstall script available in deinstall directory under GoldenGate Home. The following explains the steps on the same.
[oracle@12r1-rac1 12121]$ ./ggsci Oracle GoldenGate Command Interpreter for Oracle Version 12.1.2.1.0 OGGCORE_12.1.2.1.0_PLATFORMS_140727.2135.1_FBO Linux, x64, 64bit (optimized), Oracle 12c on Aug 7 2014 10:21:34 Operating system character set identified as UTF-8. Copyright (C) 1995, 2014, Oracle and/or its affiliates. All rights reserved. GGSCI (12r1-rac1.selvapc.com) 1> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER STOPPED EXTRACT ABENDED DEMO1E 00:00:02 154:53:03 GGSCI (12r1-rac1.selvapc.com) 2>The process is already abended as I did some changes (out of scope for this article). If the process is running, please stop the process by stop command.
STOP EXTRACT DEMO1E
One can stop all the extract and replicat process at once issueing following command
STOP ER *
Stop the manager process if it is running. In our case it is already stopped hence skipping the step. Also the following delete extract step is optional as GoldenGate deinstall removes everything by itself.
GGSCI (12r1-rac1.selvapc.com) 2> delete ext * Are you sure you want to delete all groups? y Deleted EXTRACT DEMO1E. GGSCI (12r1-rac1.selvapc.com) 3> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER STOPPED GGSCI (12r1-rac1.selvapc.com) 4> exitRun the following scripts to disable and remove DDL replication objects and marker objects.
[oracle@12r1-rac1 12121]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on Thu Dec 31 12:17:03 2015 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Advanced Analytics and Real Application Testing options SQL> @ddl_disable Trigger altered. 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:ggs_dba Working, please wait ... Spooling to file ddl_remove_spool.txt Script complete. SQL> @remove_marker SP2-0310: unable to open file "remove_marker.sql" 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:ggs_dba PL/SQL procedure successfully completed. Sequence dropped. Table dropped. Script complete. -- The following revoke is optional as I'm going to drop the user ggs_dba once goldengate is uninstalled. -- For target database the privilege_type is 'apply' or '*' is both capture and apply is granted. SQL> exec dbms_goldengate_auth.revoke_admin_privilege(grantee => 'ggs_dba', privilege_type => 'capture'); PL/SQL procedure successfully completed. SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Advanced Analytics and Real Application Testing optionsChange to deinstall directory under GoldenGate Home and run the deinstall script.
[oracle@12r1-rac1 12121]$ cd deinstall/ [oracle@12r1-rac1 deinstall]$ ./deinstall.sh ALERT: Ensure all the processes running from the current Oracle Home are shutdown prior to running this software uninstallation script. Proceed with removing Oracle GoldenGate home: /u02/gg_home/12121 (yes/no)? [no] yes Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 3068 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-12-31_12-22-16PM. Please wait ...Oracle Universal Installer, Version 11.2.0.3.0 Production Copyright (C) 1999, 2011, Oracle. All rights reserved. Starting deinstall Deinstall in progress (Thursday, December 31, 2015 12:22:36 PM IST) ............................................................... 100% Done. Deinstall successful End of install phases.(Thursday, December 31, 2015 12:23:02 PM IST) End of deinstallations Please check '/oracle/oraInventory/logs/silentInstall2015-12-31_12-22-16PM.log' for more details. [oracle@12r1-rac1 deinstall]$ [oracle@12r1-rac1 deinstall]$ cd .. cd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory [oracle@12r1-rac1 ..]$ pwd /u02/gg_home/12121/deinstall/.. [oracle@12r1-rac1 ..]$ cd /u02/gg_home/ [oracle@12r1-rac1 gg_home]$ ls -lrt total 0Once the GoldenGate software is uninstalled, one can drop the GoldenGate schema.
[oracle@12r1-rac1 gg_home]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on Thu Dec 31 12:24:20 2015 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Advanced Analytics and Real Application Testing options SQL> drop user ggs_dba cascade; User dropped. SQL>Everything's done!
Happy deinstall!!