cancel
Showing results for 
Search instead for 
Did you mean: 

Autostart Oracle 10g listener on Redhat 5.3 Enterprise after reboot

Former Member
0 Kudos

I was wondering what is the easiest way to autorestart the oracle listener after reboot on Readhat 5.3 Enterprise. I am very green and i am looking for a step by step approach. As far as i have gotten is that i need to build a script and save it to /etc/rc.d/init.d directory. What i am not clear on is the fact that the ORA<sid> has to be the user starting the listener and what run level should i be using? I can struggle and figure out all of the pieces but i was hoping someone might have an easier way of autostarting the listener after a reboot.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I am not quite familiar with RedHat but maybe it is the same as Suse - so check and try the following:

See if there is a directory /etc/rc.d/rc3.d (this is the directory for runlevel 3).

In this directory you can create a file with a name like SORALNSR## (the script name's first character must be a capital as to indicate a start script to the runlevel - ## is a number - it should be the highest number of all S* files in that directory which means this start script will be run as the last one).

Within the script file use the following:

#!/bin/sh
su - orasid -c "lsnrctl start <LISTNER_NAME>"

This means that the script run by the root user will do a user switch from root to orasid and execute the listener start command. This should be sufficient to start the listener automatically once the system comes up.

But note - run level 3 stands for the runlevel which has all services (including network services) up but does only use Shell access (no GUI!!).

If you run your system with a GUI that is runlevel 5. In that case copy the script into the folder /etc/rc.d/rc5.d so that the script will also be executed when it goes to runlevel 5.

Hope this helps.