Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: listener woes
On Wed, 25 Oct 2000 10:00:55 -0700, "jawa" <p29682_at_email.mot.com> wrote:
>Oracle 7.3.4.4 on AIX -- Why doesn't the listener process startup on a
>system reboot using the following call from /etc/inittab to the following
>script dbora? The 'stop' stanza works fine. The 'start' stanza starts the
>databases but not the listener. It's as if some oracle process needs to be
>running before the call to lsnrctl happens. Any ideas?
>
>inittab entry:
>oracle:2:wait:/bin/su oracle -c "/.../.../dbora start"
>
>dbora script:
>#!/bin/sh
>if [ ! -f ${ORACLE_HOME}/bin/dbstart -o ! -d ${ORACLE_HOME} ]
> then
> echo "Oracle startup: cannot start"
> exit
> fi
>#
>case "$1" in
> 'start') #Start the Oracle Databases
> ${ORACLE_HOME}/bin/dbstart
> wait;sync;sync;sync;sleep 10
> ${ORA_HOME}/bin/lsnrctl start
> wait;sync;sync;sync;sleep 10
> ;;
> 'stop')
> ${ORACLE_HOME}/bin/lsnrctl stop
> wait;sync;sync;sync;sleep 10
> ${ORACLE_HOME}/bin/dbshut
> wait;sync;sync;sync;sleep 10
> ;;
>esac
>#
>
>
Create an entry in /etc/inittab (just before the tty entries at the end) as follows
oracle:2:once:/etc/rc.oracle >/dev/console 2>&1
Create a file /etc/rc.oracle containing
#!/bin/ksh
su - oracle -c /u05/app/oracle/product/8.0.5/bin/dbstart
#Start all local Databases
su - oracle -c /u05/app/oracle/product/8.0.5/bin/lsnrctl start
#Start the Oracle Listener
This works on all my production systems.
For automated shutdown create a file /etc/rc.shutdown containing
su - oracle -c /u05/app/oracle/product/8.0.5/bin/lsnrctl stop su - oracle -c /u05/app/oracle/product/8.0.5/bin/dbshut
Do NOT use shutdown -F to shut or reboot the box otherwise the script will not run
Alex Received on Mon Oct 30 2000 - 08:24:39 CST
![]() |
![]() |