Have you ever had a situation where Oracle database software or services have not been uninstalled properly or completely on a Windows OS?

Well this happens more often that we would like. The options left to us at this point are either painstaking editing of the OS registry or manually hacking and deleting files and folder under the original Oracle home. Sometimes you’d even have to do both and then the ultimate pain is needing to reboot the server to release a lock that some Oracle process still has on a .dll file you’re trying to delete.

I had this client whom I was teaching Oracle 11G patching and upgrading. Let us call this client “Michael”. Things were going along fine initially. We performed 2 upgrades of the Oracle databases from 10G to 11G without a hitch, but about one week later I received an email from Michael looking for help because something went wrong and he had to un-install the 11G Oracle database software from another server he’s working on. Uninstalling Oracle software did not go as planned. I asked Michael if he had used the new de-install package that comes with Oracle 11G DB install software? He said he did not use it nor did he know about it. If you’ve ever run into any similar scenario (i.e botched attempt to remove Oracle software or Oracle services from a Windows OS box) then this nifty tool I have found is for you.

Windows OS comes with this command called SC. It can be used to start and stop various services running under Windows OS. But it also does more than that. You can use it to remove Oracle Services that are left over from a hosed up de-install attempt.

The steps to follow:
1 – Open Windows OS DOS prompt (Run it as Administrator if using Window Server 2008 OS)
2 – From the command prompt type the following:

    sc delete OracleServiceDNAME    

The above command will remove the ophaned and hosed remnant of that service from the OS and its registry.

    sc delete OracleOraDb11g_home1TNSListenerListener1

The above command will remove the named listener service

3 – Check and verify that the entries and link for deleted Oracle service are removed from Control Panel ->Administrative Tools ->Services

This has saved Michael and I much time. Not to mention this saved us the pain of hacking through the Windows OS registry or rebooting the Windows server OS.

Share This