1) Close all Oracle-related services and processes
Control Panel-System and Security-Management Tools-Services, stop all services at the beginning of Oracle.
Check the task manager (click the process interface with the mouse, and type o on the keyboard to search) to ensure that there is no process beginning with ora.
2) The administrator runs the uninstall script that comes with Oracle
The path is: %ORACLE_HOME%\deinstall\deinstall.bat
The administrator runs cmd to execute the script:
Check the installation here, list the detection items, and complete the interactive configuration according to the prompts:
The waiting time is long, you need to wait patiently...
(If you confirm that there is only one Oracle instance on the operating system, except for the following screenshot steps, all other interactive options can be directly entered to use the default values)
3) Clean up the installation directory and registry
Delete the Oracle software installation directory
D:\app
PS: If the oci.ddl file in the changed directory cannot be deleted, the following prompt will be reported, and the service in the prompt must be stopped before deleting.
Check whether the oracle directory exists in the system disk (if the directory exists, it needs to be deleted. Under normal circumstances, the directory will be automatically cleared after running the deinstall.bat script)
C:\Program Files\oracle
After the deinstall.bat script is executed, most of the oracle registry has been cleaned up, only the following one needs to be cleaned up.
DELETE HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
You can paste the following commands into the bat file, right-click the administrator to execute, and reconfirm that the Oracle-related registry has been cleaned up.
(If the built-in uninstall script fails to run, you need to run this script. If the instance name is not ORCL, replace ORCL in the following command with the actual environment instance name)
@echo on REG DELETE HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE /f REG DELETE HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Oracle11 /f REG DELETE "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Oracle Data Provider for .NET" /f REG DELETE HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\OracleJobSchedulerORCL /f REG DELETE HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\OracleMTSRecoveryService /f REG DELETE HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\OracleOraDb11g_home1ClrAgent /f REG DELETE HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\OracleOraDb11g_home1TNSListener /f REG DELETE HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\OracleServiceORCL /f REG DELETE HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\OracleVssWriterORCL /f REG DELETE HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\OracleRemExecService /f pause |
4) Restart the operating system