-
Hi,
I have Oracle8i (8.1.7) installed on Solaris 5.8 machine. After reboot the machine, database will startup automatically, but listener will not start automatically. Got TNS-12541, TNS-12560, TNS-00511 errors.
I checked oratab, dbstart, listener.ora, and tnsnames.ora files and they seem fine. I can start listener manually by issuing 'lsnrctl start'. Does this mean that listener.ora and tnsnames.ora files are good? Also /var/tmp/.oracle was created each time machine was reboot.
I set the listener trace level to user, here is the listener.trc file generated after reboot the machine.
nscon: sending NSPTRF packet
nstimarmed: no timer allocated
nsclose: closing transport
nsclose: global context check-out (from slot 4) complete
tnslsnr: connect string inst->lcxd[0]: (ADDRESS=(PROTOCOL=tcp)(HOST=dino)(PORT=1521))
nsopen: opening transport...
nttcnp: Validnode Table IN use; err 0x0
nttcnp: getting sockname
nttcnr: waiting to accept a connection.
nttcnr: getting sockname
nttvlser: valid node check on incoming node 127.0.0.1
nttvlser: Accepted Entry: 127.0.0.1
nttcon: set TCP_NODELAY on 13
nsopen: transport is open
nsnainit: inf->nsinfflg[0]: 0xd inf->nsinfflg[1]: 0xd
nsopen: global context check-in (to slot 4) complete
nsanswer: deferring connect attempt; at stage 5
nscon: doing connect handshake...
nscon: got NSPTCN packet
nsevdansw: exit
nscon: sending NSPTRF packet
nstimarmed: no timer allocated
nsclose: closing transport
nsclose: global context check-out (from slot 4) complete
nsglecmd: Deallocating cxd 0x130cd0.
nsglecmd: Command specified to exit tnslsnr.
tnslsnr: connect string inst->lcxd[0]: (ADDRESS=(PROTOCOL=tcp)(HOST=dino)(PORT=1521))
nstimarmed: no timer allocated
nsclose: closing transport
nsclose: global context check-out (from slot 2) complete
nsglhfre: Terminating listening endpoint: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dino)(PORT=1521)))
nstimarmed: no timer allocated
nsclose: closing transport
nsclose: global context check-out (from slot 1) complete
nsglhfre: Deallocating cxd 0x101520.
I appreciate any of your advice.
Jiong
-
check the dbora file under /etc/init.d and make sure that you are starting it there...
Code:
Sample
------
#!/bin/sh
ORA_HOME=/usr/local/oracle/app/oracle/product/8.1.7
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup cannot start, because the ORA_HOME/bin does not have t
he dbstart file"
exit
fi
case "$1" in
'start')
# Start the oracle databases:
# The following command does not prompt the oracle
# user for any values.
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"
;;
'stop')
# Stop the oracle databases:
# The following command does not prompt the oracle
# user for any values
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut"
;;
esac
Sam
Thanx
Sam
Life is a journey, not a destination!
-
-
Hi, Sam,
Here is my dbora file and I didn't modify it. Does it matter 'dbstart' or 'lsnrctl start', which comes first? Or 'dbshut' or 'lsnrctl stop', which comes first?
#!/bin/sh
# This file starts and shuts down oracle
#
# Start/stop processes required for oracle
#
ORACLE_BASE=/export/home/oracle
ORACLE_HOME=$ORACLE_BASE/products/8.1.7
PATH=.:$PATH:/usr/local/bin:$ORACLE_HOME/bin:/usr/ccs/bin
case "$1" in
'start')
su - oracle -c "$ORACLE_HOME/bin/dbstart" &
su - oracle -c "$ORACLE_HOME/bin/lsnrctl start" &
echo "Database started." >> /tmp/db.log
;;
'stop')
echo "Stopping Database..." >> /tmp/db.log
su - oracle -c "$ORACLE_HOME/bin/dbshut immediate" &
su - oracle -c "$ORACLE_HOME/bin/lsnrctl stop" &
echo "Database halted." >> /tmp/db.log
;;
*)
echo "Usage: /etc/init.d/oracle { start | stop }"
;;
esac
Thanks,
Jiong
-
Hi,
Also check oratab file under /var/opt/oracle director. The entry should be like this in order to run auto shutdown / startup scripts.
ORACLE_SID:/export/home/oracle/product/8.1.6:Y
Cheers!
Farrukh
-
Is your database getting started when the box is restarted?
Does /tmp/db.log get updated when the box reboots?
Jeff Hunter
-
Earlier it was not an issue which took the preceedence. But as of 8i Oracle suggests that you first start your listeners and then start the databases.
Did you check the listener.log for any errors?
Sam
Thanx
Sam
Life is a journey, not a destination!
-
Hi, Farrukh:
The oratab file is like the following,
::Y
I read some previous posts in this forum about automatically startup database and start listener. My situation is different in that the database startup automatically but the listener doesn't. I think there is something wrong outside of oratab, dbora, listener.ora, and tnsnames.ora files.
Thank you,
Jiong
-
I noticed that your dbshut call was put in the background with the &. While it is acceptable to have the startup in the background, the shutdown should be called in the foreground. Otherwise, there is the distinct possibility that the system could shutdown before all of the databases were closed, which would cause them to 'crash'.
What are the exact messages in the system log? The TNS error number and exact order may indicate the actual problem v. a secondary symptom.
It has been my experience that the cause is usually related to the environment. Although su - should properly set the environment, I have found that it is not always the case.
Daniel W. Fink
oracledba@ix.netcom.com
-
Hi, Farrukh,
The oratab file is like
ORACLE_SID:ORACLE_HOME:Y
In my previous reply, I put "<>" around the variables and it came out as ::Y.
----------------------------------------
Hi, Jeff,
The database got startup but listener not. The /tmp/db.log file got updated and it showed 'Database started'.
----------------------------------------
Hi, Sam,
Here is what I got in the listener.log after I reboot the machine.
03-DEC-2001 16:54:16 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=dino)(USER=oracle))(COMMAND=stop)(ARGUMENTS=64)(SERVICE=LISTENER) (VERSION=135294976)) * stop * 0
No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dino)(PORT=1521)))
I am going to switch the preceedence of database and listener in dbora file and see whether it will work.
----------------------------------------
Hi, Daniel,
I am going to try to drop '&' in dbora and see if that works.
----------------------------------------
Thank you all,
Jiong
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|