Looking for something? Try here..

Thursday, December 31, 2015

Uninstalling GoldenGate software

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> exit

Run 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 options

Change 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 0

Once 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!!

3 comments:

  1. Hi Mate,

    Thanks to sharing the Golden Gate articles.

    I am new to GG and learning the GG my self.
    I have good understanding knowledge on GG and i installed and configure the unidirectional data replication from source to target.
    Actually my actual concern is i need some real time scenarios and Interview Questions and errors-solutions. Mostly what type of issues we will face in real time on GG.

    Kindly help me on this....

    I really appreciate you if you can provide step by step.

    Regards
    Veera

    ReplyDelete
    Replies
    1. Hi,
      I believe you would have crossed a lots of hurdles when installing and configuring OGG which are the same hiccups that we will have in the production environment also.
      One main thing is convincing the customer/client to go with OGG as it is an additional licensed product. I have posted some of the issues or hints/workarounds to bypass the issues that might occur in OGG process that would help.
      In one case where my RAC db was not completely or correctly converted to standalone, I had issues with thread 2 (which actually didn't exist) so I had to use THREADOPTIONS parameter to overcome the error.
      In another case, the issue is with the version of OGG that I used had a bug which we hit only on the production run (didn't show up on the dev/test) involving characterset conversion.
      I would post more as and when I have something interesting to debug and resolve.
      Thanks!

      Delete