Thursday, July 3, 2008

OracleXETNSListener colud not be started

I have been using Oracle XE for months and suddenly one day I could not connect to the database. I found that the listener was not running and I attempted stop and then start the listener through the menu options(Programs->Oracle 10g Express Edition->Start Database,StopDatabase). The listener did not start.

I found many forums that talked about the same issue. Different solutions worked for different people. I tried all the solutions that were recommended but none of them really fixed my problem. One of the forum recommended reinstalling OracleXE. (Note: reinstalling will wipe out any database that you already have on XE). There are instuction to get around this problem, see Oracle XE Installation instructions for more info. So I decided to reinstall Oracle XE but it is not as straight as one might think. Here are the steps that I followed

1. login to the machine as administrator (this seems to be very important). You may be thinking your domain account as local administrator rights. That doesn't really matter. Oracle requires you to login as adminstrator of the machine.

2. Run Oracle XE setup exe. You will be prompted to either Repair or Remove. Choose Remove.

3. Complete the remove process.

4. Open Environment variables (My Computer->Properties->Advanced->Environment Variables)

5. Remove ORACLE_HOME and ORACLE_SID system variables (This is very important. My previous attempt without this step did not fix my problem)

6. Reboot the machine. (one more important step)

7. Log in as administrator

8. Install Oracle XE

That's it! You should be able to open Oracle Home.

Drop couple of lines if this worked for you.