Sunday, August 14, 2005

Uninstalling Oracle 10g Manually from Windows XP

Oracle's installation utility has a nasty habit of leaving a lot of items behind.  I wrote this up to document what I've found you need to do to uninstall Oracle 10g manually.  This is specific to 10g and Windows XP.  Removing 9i is very similar if I remember right, but who's using 9i anymore? ;-)

The first thing you should do, is go ahead and run the installation tool to do an uninstall.  It probably will leave some things behind, but it's worth running.  Then go through this list and remove anything it missed.  This list is detailed enough though, that I believe even if you did not run the uninstallation tool, this would fully uninstall Oracle.

The most commonly missed item is to make sure you remove everything from the GAC because the uninstaller doesn't appear to.  I get to that later, but if you wanted to know the largest source of uninstallation problems, it's libraries remaining in the GAC.

After running the supplied Oracle uninstallation utility (which may or may not do some or all of the following):

  • Stop any Oracle services that have been left running.
    Start->Settings->Control Panel->Services
    Look for any services with names starting with 'Oracle' and stop them.

  • Run regedit and delete the following keys (some may have slightly different names in your registry):
    HKEY_CURRENT_USER\SOFTWARE\ORACLE
    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\Oracle.oracle
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OracleDBConsole
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Oracle10g_home
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OraclService

    Note that the services control panel will still show the old services until you reboot.

  • Delete the Oracle home directory
    C:\Oracle

  • Delete the Oracle Program Files directory:
    C:\Program Files\Oracle

  • Delete the Oracle Start Menu shortcuts directory:
    C:\Documents and Settings\All Users\Start Menu\Programs\Oracle*
    Where * indicates the name of your install.  Look for and remove all Oracle directories from that location.

  • Remove Oracle refereces from the path.  To edit your path go to:
    Start->Settings->Control Panel->System->Advanced->Environment Variables
    Edit both of the environment variables user PATH and system PATH.  Remove any Oracle references in them.

  • Remove Oracle.DataAccess and any Polic.Oracle files from the GAC which is at:
    C:\Windows\assembly\



  • There, now your system is Oracle free.  If you are installing a new instance of Oracle (and not just an additional DB) I recommend you do this before any new Oracle installation.
    Note: I used several other websites and searches as references when developing these steps, but I was unable to find any steps that covered all of the items for Oracle 10g so I assembled them here.

    51 comments:

    Bals said...

    Nice one. thanks for the effort, really helpful.

    creed said...

    Hey, I've now used this about a hundred times and a link to this page is in my official documentation! Thanks!

    Nilesh said...

    Thanks a ton. This really helped.

    vgpjava said...

    Appreciated. Good and worthy information. Keep it up.
    vgpjava

    vgpjava said...

    Thanks a lot. Great8. Worthy information. Keep it up. good work

    Linda W said...

    Thanks so much - it worked. I just wanted to load a trial version to load in some sample databases provided by a book author. The load scripts were provided, but I could never get the tnsnames entry to work. Any suggestions? Thanks, Linda

    jdhuck said...

    Thanks for the this, it really helps. One problem that I have ran into is in deleting the oracle directory. Java.exe is running and it won't delete. I found that when I end the java.exe process, I can delete the oracle directory. Hopefully this will help someone if they run into this issue.

    despot said...

    Thanks for the help!!! I've done what you said and it worked. I just ran into one problem: I can't delete the oci.dll (Oracle Call Interface) in C:\oracle\product\10.2.0\db_1\BIN directory. Do you have some tip for this?

    Ivana said...

    thank you for writing these instructions. they are very helpful.

    S m i t h a said...

    Thanks. That was really helpful!

    Uchi said...

    Thanks but most of the things were already removed after running the deinstallation.

    Anyway thanks again ! and keep writing ...

    Mell said...

    I had to delete quite a few more registry items before I could delete the C:\Oracle folder, but you put me on the right track.
    Thank you, what a helpful post!

    Mell said...

    I had to delete quite a few more registry items before I could delete the C:\Oracle folder, but you put me on the right track.
    Thank you, what a helpful post!

    Andrej said...

    Helped a lot!

    Thanx man!

    Dillon Coetzer said...

    Thanks for the article - you saved me loads of time!

    Mayur said...

    Hi,
    I tried this but one file in OraHome_1 folder is not deleting. File name is oci.dll when I tried to delete manually, it gives some error. Called Write disk full, file is in use, blah blah....
    Can you help me with this?

    Geets said...

    Hi..
    I was following the notes given and in the last found its not "C:\Windows\assembly\"
    but

    C:\Windows\prefetch\

    Rgds
    Geeta

    sunny said...

    The reason I deleted the Oracle DB is to reinstall it. However, after I installed it again, something behaved really strange. The DB should be be automatically star-up, but it did not. I tried to start the DB, it just kept complaining that I gave wrong credential though everything I typed in was correct. Help!!!

    suguna said...

    Does the uninstallation notes work for MS Vista?

    wale said...

    Thanks its been really helpful; even on vista; but i cant stop the Oracle.DataAccess, any views on this

    suneel said...

    Thanks a lot. That helped me fix some installation issues with 10g. You rock!!

    Wilson Bright said...

    you really helped me to fix my problem...keep rocking

    Mostafa Salem. said...

    thanks alot

    Surendran said...

    Thank you!!

    Zizo said...

    Thanks a lot.

    Bill Menees said...

    On a 64-bit system, you should also delete the following registry key if you installed the 32-bit Oracle client:

    HKEY_LOCAL_MACHINE\Software\Wow6432Node\Oracle

    Vijay said...

    Thanks a lot. It really helped

    Vijay said...

    Thanks a lot. It really helped.

    priya said...

    thanks alot
    its really work . i was trying to install 11g and its helps me a lot to uninstall 10g.thanks a lot

    KHP said...

    Thanks a lot.

    Aayush said...

    thanks a lot for providing such a usefull information.

    Kamalakannan said...

    Truly nice work. It really helped me

    Abdulla Axmeen said...

    really helpfull. thanx

    Coolcocoon said...

    Hi, Thanks. Very helpful.

    But I still couldn't uninstall 11 items still stuck in C:\Windows\Assembly\. Access denied.

    I have to use safe mode now cos' after I've installed on Vista Biz, my C drive was frozen and became inaccessible. Each time I used program or internet, error message kept popping up saying "Temp file creation failed" or "Browser memory full".

    I couldn't change the alloted memory for temp files in Tools >> Internet options >> Browsing history >> Settings >> Dispace to use >> ...MB

    Somebody help me out???

    मि. महर्षि said...

    Thanks a lot
    its really very helpful..

    erika said...

    i have done all the steps that you told me except that. i cannot locate the c:\windows\assembly folder.

    also, before i installed oracle i had 17.8 of free space.
    now, after uninstalling it and following the steps. i only have 17.2 of free space. so there is about 600mb of missing space. this also happened to me with the 9i version.

    vivekbharathi said...

    Thanks a lot !! was useful

    krakaj said...

    thx mate !

    sun1991 said...

    Nice one. Thank you for the help!

    dghnfgj said...

    Youth is warcraft leveling not a time of life;warcraft leveling it is a wow lvl state of mind; wow power level it is not power leveling amatter of World of warcraft Power Leveling rosy cheeks, red wrath of the lich king power leveling lips and supple knees;WOTLK Power Leveling it is a matter of thewill,wlk Power Leveling a quality of buy aoc gold the imagination,aoc gold a vigor of the emotions; it is thefreshness of the deep springs wow gold of life. Youth means a tempera-mental maplestory mesos predominance of courage over timidity, of the appetite formaple story mesos adventure over the love of ease. wow gold This often existsin a man of 60 more than a boy of 20. Nobody grows old merely by anumber of years.

    i-am-evil said...

    It's such a pain uninstalling Oracle 10g. Thanks for this, it was very helpful. =)

    jayfla said...

    Hey Aric. thanks for the posting on the removal of Oracle from the computer. Saved me a lot of problems. You're a lifesaver.

    Alagu said...

    Thank you so much! Its an amazing remedy which solved hell of a problem. Once again thanks and I appreciate your knowledge.

    paras said...

    Dear Aric's

    The best thing about you blog instruction on uninstalling the Oracle 10g is that they are complete. There is nothing missing in it. Most of the instructions in regards to the oracle 10g are incomplete by other authors. I needed on more. To install oracle 10g database and developer suite along with patch on Vista 32 bit. Can you do that with screen shots.

    regards
    and thanks paras

    paras said...

    Dear Aric's

    The best thing about you blog instruction on uninstalling the Oracle 10g is that they are complete. There is nothing missing in it. Most of the instructions in regards to the oracle 10g are incomplete by other authors. I needed on more. To install oracle 10g database and developer suite along with patch on Vista 32 bit. Can you do that with screen shots.

    regards
    and thanks paras

    xxmy said...
    This post has been removed by a blog administrator.
    Yasmine Mohamed said...

    Thanks a lot. It was really helpful.

    abu said...

    You are the man...
    Thanks,
    Abrar

    Tina said...

    Thank You so much !! It saved me a lot of time :)

    dfous said...

    Bon marche de Dofus Kamas.achat de dofus.le prix moins cher.nous vendons dofus,or de Wakfu. 24/7 appui-en-ligne et livraison rapide.Wakfu Kamas
    china: chinaserving

    Tony G said...

    That was a really detailed and useful post! I have come across a number of posts on the same subject but none as detailed as this. I have bookmarked this page and shall post a link to it on my soon-to-be-launched websites as well.

    Keep up the good work.