How to uninstall Golden Gate 184.108.40.206.0 from Linux machines and 12cR1 Oracle databases?
In the OGG_HOME, there is a "deinstall" folder, with a deinstall script: do not run it yet! There are things to do first!
Find out where the trail files are:
Trail files are the in:
ll -R /data/****f/dump1/ogg/dirdat/DEVP/
Contents of the inventory.xml file before the uninstallation (mine is in /app/oracle/product/ogg/oraInventory/ContentsXML/inventory.xml ):
In case you want to reproduce the same OGG extracts or replicats in the future, save the *prm and *obey files that are typîccaly in $OGG_HOME/dirprm:
Now let's stop all Golden Gate activity. Do it on the source and all the destinations!
GGSCI (r****f) 2> stop er*
Once everything (manager, replicats, extracts) are stopped, let's use the Oracle-provided sql scripts to uninstall Golden Gate from the database.
Launch SQL*Plus from the OGG_HOME (where the ddl_disable.sql, ddl_remove.sql and marker_remove.sql files are located):
ALTER TRIGGER sys .GGS_DDL_TRIGGER_BEFORE DISABLE
ERROR at line 1:
ORA-04080: trigger 'GGS_DDL_TRIGGER_BEFORE' does not exist
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:OGGADMIN
Working, please wait ...
Spooling to file ddl_remove_spool.txt
Exit SQL*Plus then cd to the OGG_HOME/deinstall directory and run deinstall.sh:
The log should say:
[ogg@r**** deinstall]$ cat /app/oracle/product/ogg/oraInventory/logs/silentInstall2020-06-30_08-09-53PM.log
This deinstallation was successful
End of deinstallations
The REPLICATs are gone:
And all the Golden Gate directory structure is gone from the OGG_HOME:
[ogg@r****f 12.2.0]$ echo $OGG_HOME
[ogg@rbpsvlrd0f 12.2.0]$ ll
Check oraInventory and confirm $OGG_HOME has been removed from inventory.
If the OGG user is not used for anything else, we can drop it:
We can also get rid of the trail files, so as to save disk space:
And delete the Oracle Golden Gate Linux user if it's no longer needed:
as root: cat /etc/passwd|grep ogg ; userdel -r ogg ; cat /etc/passwd|grep ogg
Problem when you don't have enough swap: the deinstall program requires 500MB of swap space. This is what occurs if you have less than that:
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: /app/oracle/product/ogg/12.2.0 (yes/no)? [no]
Starting Oracle Universal Installer...
Checking swap space: 76 MB available, 500 MB required. Failed <<<<
Some requirement checks failed. You must fulfill these requirements before
continuing with the installation,
Exiting Oracle Universal Installer, log for this session can be found at /app/oracle/product/ogg/oraInventory/logs/installActions2020-06-30_07-07-33PM.log
I checked the script and could not find a way to bypass that swap space requirement. So you really must clear swap space, as root :
Between swapoff and swapon, there can elapse a long time, as the data that was in the swap must be transferred to RAM. The bigger the used space in the swap and the more RAM-starved your OS, the longer it will take.
Then the deinstall program will run successfully as above.
I welcome comments/questions/your 2 cents...