Skip to content
Home » Oracle » How to Resolve ORACLE_HOME_LISTNER is not SET

How to Resolve ORACLE_HOME_LISTNER is not SET

ORACLE_HOME_LISTNER is not SET

dbstart

Got this error when I used dbstart to startup all required instances:

ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener.

This is because dbstart takes the first argument of this command as the database home path for listener to startup. Which means, this command will start both database and listener at the same time.

dbshut

For the same reason, we saw error when we stop it by dbshut.

Since ORACLE_HOME is not set, cannot auto-stop Oracle Net Listener

Solutions

Specify $ORACLE_HOME

You can either add an argument right after dbstart every time you use it:

[oracle@test ~]$ dbstart $ORACLE_HOME

Then the program knows where to find the listener to start.

Modify dbstart

We can also set the variable ORACLE_HOME_LISTNER to an explicit path in the script if you won't change listener home path in the near future.

[oracle@test ~]$ vi `which dbstart`
...
#ORACLE_HOME_LISTNER=$1
ORACLE_HOME_LISTNER=$ORACLE_HOME

It's worth mentioning that there's a missing letter "E" in the variable name ORACLE_HOME_LISTNER deliberately, which is NOT a typo. Can you tell that?

As for dbshut, it has the same solutions as dbstart.

Shell Scripts for Server Reboots

In addition to dbstart and dbshut, you may need a shell script to auto start and auto stop Oracle database on Linux.

For Solaris, there's also a shell script to auto start and auto stop Oracle database on Solaris.

You can find out more information about systematical startup and shutdown at Oracle documentation: Stopping and Starting Oracle Software

Leave a Reply

Your email address will not be published. Required fields are marked *