- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Can't get Oracle to autostart
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2001 11:07 AM
тАО08-27-2001 11:07 AM
in /sbin/init.d and /sbin/rc2.d and /sbin/rc0.d per Oracle documentation to start/stop oracle when the HP computer starts up or shutdown.
When the computer comes up Oracle is not started but checking the /etc/rc.log files does not show any errors. (Have attached last lines of rc.log file that shows the /sbin/rc2.d/S99dbora as being executed. (I put a set -x) in script to print out data for troubleshooting.
The dbora file is as follows:
set -x
PATH=$PATH:/oracle/oradb1:/oracle/oradb1/bin:/oracle/oradb1/lib;export PATH
ORACLE_BASE=/oracle;export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/oradb1;export ORACLE_HOME
ORACLE_SID=oradb1;export ORACLE_SID
CLASS_PATH=$ORACLE_HOME/JRE/lib/rt.jar:$ORACLE_HOME/jlib:$ORACLE_HOME/lib:$ORACL
E_HOME/network/jlib;export CLASS_PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
SHLIB_PATH=$ORACLE_HOME/lib;export SHLIB_PATH
PATH=$PATH:/usr/ccs/bin:$ORACLE_BASE:/usr/lib/X11:/usr/local/bin:/bin;export PAT
H
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data;export ORA_NLS33
export TNS_ADMIN=$ORACLE_HOME/network/admin
if [ ! -f $ORACLE_HOME/bin/dbstart ]
then
echo "ORACLE startup: cannot start"
exit
fi
case "$1" in
'start')
/usr/bin/su oracle -c "/oracle/oradb1/bin/dbstart &"
;;
'stop')
/usr/bin/su - oracle -c "/oracle/oradb1/bin/dbshut &"
;;
esac
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2001 11:21 AM
тАО08-27-2001 11:21 AM
Re: Can't get Oracle to autostart
This could be the problem,you may be missing the - between su and oracle to load oracle profile.
change:
/usr/bin/su -oracle -c "/oracle/oradb1/bin/dbstart &"
to:
/usr/bin/su oracle -c "/oracle/oradb1/bin/dbstart &"
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2001 11:28 AM
тАО08-27-2001 11:28 AM
Re: Can't get Oracle to autostart
I suspect that you have two problems:
1) the missing su "-" as mentioned earlier
2) your oracle .profile has stty commandsd, tabs, etc. You should either if out those command with a if [ -t 0 ] or source a separate environment command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2001 11:32 AM
тАО08-27-2001 11:32 AM
Re: Can't get Oracle to autostart
Personally, I use the /sbin/init.d/dbora file to startup the listeners, and has the following content:
PATH=/usr/sbin:/usr/bin:/sbin
export PATH
su - oracle -c "lsnrctl start"
An important file is /etc/rc.config.d/oracle, this file tells you if you will be able to start th DB with dbstart, it content is:
ORACLE_START=1
export ORACLE_START
The system administrator can change this to :
ORACLE_START=0
to disable automatic startup and shutdown of databases.
I also recommend you to check the /etc/oratab file, should have the following content:
ORACLE_SID:ORACLE_HOME:{Y | N}
And finally, create a file /sbin/init.d/oracle with your dbora file content.
If you have any additional question, please fell free to email: l_canepa@yahoo.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2001 11:37 AM
тАО08-27-2001 11:37 AM
Re: Can't get Oracle to autostart
what happens when you try running the script manually
/sbin/init.d/dbora start
/sbin/init.d/dbora stop
-Regards
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2001 11:48 AM
тАО08-27-2001 11:48 AM
Re: Can't get Oracle to autostart
I took everyones advice and put a "-" after the su
I am now getting the
stty: not a typewrite error.
Yes the oracle .profile has stty commands etc. How do I use the [-t 0] to get around this. Have never used command like this before.
Thanks to all that have replied previously!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2001 11:54 AM
тАО08-27-2001 11:54 AM
Re: Can't get Oracle to autostart
Had the same problem, and found after several days of debugging that the startup / shutdown didn't work in the background... I couldn't figure out why,
but when I removed the ampersand (&) in the script:
/usr/bin/su oracle -c /oracle/oradb1/bin/dbstart &
everything worked...
why... beats me?
Andreas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2001 11:58 AM
тАО08-27-2001 11:58 AM
Re: Can't get Oracle to autostart
Have you checked your /etc/oratab file? If you look at the code of the $ORACLE_HOME/bin/dbstart script, it will only start those databases that are listed with a "Y" in the /etc/oratab file. Make sure your oratab file looks like this:
The "Y" specifies that the database should start on OS startup. Put an "N" here if you want to start the database manually.
I hope this helps a little,
Jared
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2001 12:03 PM
тАО08-27-2001 12:03 PM
SolutionThe test [ -t 0 ] will return true if the process is interactive and false if it is not.
Surround 'stty' calls in your $HOME/.profile with the test. Instead of unconditionally calling 'styy' as in:
# stty erase "^H" kill "^U" intr "^C" eof "^D"
...do:
# if [ -t 0 ]
> then
> stty erase "^H" kill "^U" intr "^C" eof "^D"
> fi
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2001 08:10 AM
тАО08-28-2001 08:10 AM
Re: Can't get Oracle to autostart
that ampersand to start your dbstart/dbshut in
the background is quite dangerous:
all those rc-scripts are supposed to run
sequentially - one after the other - not in
parallel!
The way you start your oracle commands the
"rest" of the rc-scripts will start before
oracle even has done a little bit of house-
keeping :-(
Just measure the time needed for
* dbshut
and for
* the rest of your shutdown scripts
What did you get? Say, 15min for oracle and
1min for the rest? Right? So, you system was
going down before oracle had any chance of
saving its SGA to disk!!! (lots of bangs here)
If you do not like the amount of time taken
by the oracle "dbshut", you could safely go
for this:
- do NOT use "dbshut", instead
- force oracle to do an checkpoint (something
--- like "alter system checkpoint;" or so)
- then do an "shutdown abort", really!
- Both together is quite safe and much faster!
BTW, you should *always* use the minus for "su"
in my opinion...
HTH,
Wodisch