The process of uninstallation of Oracle Database 12c is pretty much similar to that of uninstallation of Oracle Database 11g save some of the last few steps. So without wasting time let’s jump ahead and learn how to uninstall Oracle database 12c from Windows 7.
The process of uninstallation of Oracle database 12c which you are going to learn in this tutorial will be completely MANUAL. Thus before proceeding further, I would suggest you be extremely careful before deleting anything or making any changes.
Having said that let’s move forward and uninstall Oracle 12c from your system.
Step 1: Delete Environment Variable.
Deleting the environment variable could save you from various errors in case you are planning for re-installing the Oracle software. Many times installation gets stuck due to PRVF-3929 error stating that “Environment variable path is too long”. In order to avoid this error and to ensure glitch-free installation of Oracle software, it’s recommended to delete the environment variable entry of your Oracle Home.
Environment variable entry is the path to the “Bin” directory inside the Oracle Home directory and looks something like this.
C:\app\YOUR USERNAME \product\11.2.0\dbhome_1\bin;
How to Delete Environment Variable
Right Click your Computer Icons and Select “Properties”. Then from the left-hand side panel of the System Properties Windows Select “Advance System Settings”. This will open up “System Properties” Windows.
Inside the “System Properties” Windows go to “Advance” Tab and select “Environment Variable”
On the “Environment Variable” Window inside the “System Variable Section” Find entry with the name “Path”, then double click and open it. Doing so will open up an “Edit System Variable” dialogue box. On that dialogue box under the “Variable value field” find your Oracle Home entry and Delete it.
Step 2: Delete Registries
During the installation, Oracle database makes some registries in windows system to store the information of its configurations as well as for proper functioning of Oracle Windows Services. To Uninstall Oracle Database 12c completely from your system you need to properly stop all the Oracle database services which run in the background. Also if you are planning for re-installing the Oracle Database software then you also need to delete all the configuration settings.
In short, to ensure the smooth and errorless re-installation of any version of Oracle database software, without formatting your computer system, you need to delete all the Oracle Database Registries.
Registries are very fragile part of any windows system thus messing with them can be catastrophic and can harm your system, therefore, be careful while deleting them. I would highly suggest you take their backup.
How to Delete the Oracle Registries
To delete any registry you need to first access them and in windows, all the registries are placed inside the “Registry Editors”. To access the Registry Editor first open up your Run Dialogue Box by pressing Run Windows Key and ‘R’ key simultaneously or you can directly search RUN in your start menu.
Press Win Key + R –> Run Dialouge Box
Write regedit in text box.
Once you have your Run Dialogue box opened then write “regedit” into it and press enter. This will open your “Registry Editor”.
Now first we have to delete the “Oracle Software” Registry. To access this registry first go to HKEY_LOCAL_MACHINE and then go to subdirectory SOFTWARE. Under the software – search for directory “Oracle”. Once you have reached this directory, right-click and Delete it.
HKEY_LOCAL_MACHINE –> SOFTWARE –> ORACLE
Next, we have to delete all the registries for Oracle Database Services. To access these registries first go to HKEY_LOCAL_MACHINE and then go to sub directory “Systems” then “CurrentControlSet” and then “Services”. Under the Services directory, you have to find all the Registries which are responsible for your Oracle database services.
If Oracle Database 12c is the only product from Oracle that is installed on your system then search for all the registries whose names start with Oracle and Delete them. If you have other products from Oracle installed on your system then be careful and delete accordingly. In the screenshot below you can see some general Oracle Service Registries.
HKEY_LOCAL_MACHINE → SYSTEM → CurrentControlSet → SERVICES
How to back up your registries:
- To backup “Oracle Software” Registry go to HKEY_LOCAL_MACHINE inside the registry editor and then select SOFTWARE. Right click on it and then select EXPORT after this, select a location and give it a name then click – Save.
- To back up Oracle Database Services registries go to HKEY_LOCAL_MACHINE inside the registry editor and after that go to sub directory “Systems” then “CurrentControlSet”. Right-click CurrentControlSet and select export then choose a destination and give it a name.
Step 3: Restart your system.
Next, you have to restart your system so that your operating system can blend in all the settings which we just altered.
Step 4: Delete the Oracle Home Directory
An Oracle home is a directory into which all Oracle software is installed. Once you have deleted all the registries of Oracle database 12c you are free to delete Oracle home directory from your system. In order to delete Oracle Home open up your computer and go to your C drive as well as any other drive where you have installed your Oracle database 12c. Now go to APP directory than to the directory with your username here select all the files and delete them. If you want to save backups then do not delete flash_recovery_area.
If in case your folder is not getting deleted then don’t worry. First, try to refresh your system or you can also reboot the system then try deleting again. If it is still not deleting then re-check the services and registries and see whether you have deleted all the oracle registries or not. If not then delete those that are still left and then try deleting the Oracle database folder again.
Step 5: Delete Directory from Program File
Next, go to your program file directory and search for a folder with the name Oracle. I have one here and then delete it.
Step 6: Delete Directory from Start Menu.
Next, you have to delete the directory from the start menu. For that go to “C:\ProgramData\Microsoft\Windows\Start Menu\Programs” and here search for your Oracle Folder and delete it.
Step 7: Clear the Temporary files and Recycle bin
Again open your Run dialogue box and write %temp% this will open the temporary folder and here delete all the files. Next, come to your desktop and empty your recycle bin.
Step 8: Delete the Oracle user
Next and the last step is to delete the Oracle home user which we created during the installation of the Oracle database. In order to do so, right click “Computer Icon” and select “Manage”. Inside the computer management window click “Local User Groups” and then click and open “Users” folders. From the list of the user, you can delete the ones which you have created as an Oracle home user during the installation. In my case, its RebellionRider, Right click and Select Delete.
That’s all guys in this section on How to uninstall Oracle Database 12c. I hope this tutorial was useful to you.
I would request you to please share this with your friends on social network and help me reach out to more people. Take care and have a great day!