- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: WHAT DID I DO WRONG
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
тАО03-12-2002 11:50 AM
тАО03-12-2002 11:50 AM
#!/bin/sh
#Match ORACLE_HOME with whatever is in oracle/.profile
ORACLE_HOME=/u01/product/9.0.1
PATH=${PATH}:$ORACLE_HOME/bin
export ORACLE_HOME PATH
ORACLE_OWNER=oracle
case $1 in
start)
/usr/bin/su - oracle -c $ORACLE_HOME/bin/dbstart &
/usr/bin/su - oracle -c "$ORACLE_HOME/bin/lsnrctl start"
exit 0
;;
stop)
/usr/bin/su - oracle -c "$ORACLE_HOME/bin/lsnrctl stop"
/usr/bin/su - oracle -c $ORACLE_HOME/bin/dbshut
;;
esac
- I ran the script to make sure it was corrected written...
/sbin/init.d/oracle start
--- however when i check if there is any instance of oracle running
ps -ef | grep ora
nothing return except for this:
oracle 4219 1 0 10:00:24 ? 0:00 /u01/product/9.0.1/bin/tnslsnr L
ISTENER -inherit
However, when I try to create an instance of the database here is what i get as an error try to login system/manager as dba
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
HP-UX Error: 2: No such file or directory
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2002 12:00 PM
тАО03-12-2002 12:00 PM
Re: WHAT DID I DO WRONG
Looks like you forgot the quotes around the command for the su -c param in the start script.
Also you don't need the brackets around the PATH - you just need $PATH.
Also do you want the ORACLE_OWNER exported?
Maybe you should declare it ahead of the export & export it also.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2002 12:02 PM
тАО03-12-2002 12:02 PM
SolutionDo this thing.
try to run your script in debug mode so that you can test it and find out where the things were wrong. I suppose you forgot to put " sign after su -c option.
run the script again as below
# /sbin/sh -xv /sbin/init.d/oracle start
This will give you if there are any errors.
You can easily figure out what went wrong with the script. check the exit code after the execution of script in debug mode if it is 0 then your script is OK.
Let me know if you still have any problems.
Thanks,
-Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2002 12:05 PM
тАО03-12-2002 12:05 PM
Re: WHAT DID I DO WRONG
The first thing to change is the su - -c xxx to simply su -c xxx. You do not want to source .profile because it almost certainly has stuff like tset and tabs which assume you are connected to a terminal. The preferred method for doing something like this os to create a file like /usr/local/bin/oraenv.sh which contains something like:
ORACLE_BASE=aaa
ORACLE_HOME=${ORACLE_BASE}/bbb
PATH=${PATH}:${ORACLE_HOME}/bin
TNS_ADMIN=ccc
...
...
export ORACLE_BASE ORACLE_HOME PATH TNS_ADMIN
and anything else you need. Make sure that there is no exit statement.
Then both your startup script in init.d AND your oracle .profile should source this file
thusly:
. /usr/local/bin/oraenv.sh
This will set and export the needed variables while not requiring an interactive environment.
Plan B:
Surround any statements in .profile that might be interactive with:
if [ -t 0 ]
then
tset ....
fi
This will check to see if you are connected to a terminal before running the commands.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2002 12:58 PM
тАО03-12-2002 12:58 PM
Re: WHAT DID I DO WRONG
but it gives me back lot of problem
here is the script, and please help me
. /usr/local/bin/oraenv
ORACLE_HOME=/u01/product/9.0.1
ORACLE_SID=dia2
PATH=${PATH}:{$ORACLE_HOME}/bin
export ORACLE_HOME PATH TNS_ADMIN
export ORACLE_OWNER=oracle
if [ ! -f $ORACLE_HOME/bin/dbstart]
then
echo " ORACLE startup : cannot start"
exit
fi
case $1 in
start)
/usr/bin/su - oracle -c "$ORACLE_HOME/bin/lsnrctl start"
/usr/bin/su - oracle -c $ORACLE_HOME/bin/dbstart &
#/usr/bin/su - oracle -c "$ORACLE_HOME/bin/lsnrctl start"
exit 0
;;
stop)
/usr/bin/su - oracle -c "$ORACLE_HOME/bin/lsnrctl stop"
/usr/bin/su - oracle -c $ORACLE_HOME/bin/dbshut
;;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2002 01:15 PM
тАО03-12-2002 01:15 PM
Re: WHAT DID I DO WRONG
I am running 8.1.7 and see below my startup script, I do not start listener at startup but do it manually at the command prompt only if needed
# Set ORA_HOME to be equivalent to the ORACLE_HOME
# from which you wish to execute dbstart and
# dbshut
# set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME
ORA_HOME=/apps/oracle/product/8.1.7
ORA_OWNER=oracle
if [! -f $ORA_HOME/bin/dbstart]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
# Start the Oracle databases:
# The following command assumes that the oracle login will not prompt the
# user for any values
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart &
;;
'stop')
# Stop the Oracle databases:
# The following command assumes that the oracle login will not prompt the
# user for any values
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &
;;
esac
I assume you are able to start oracle as the oracle user and works okay...?
Thanks,
Shabu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2002 01:27 PM
тАО03-12-2002 01:27 PM
Re: WHAT DID I DO WRONG
I don't think you have to set your oracle SID in your startup script, the dbstart script that you execute actually gets the SID from your oratab file...
Let us know if you still have problems ...
Thanks,
Shabu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2002 01:30 PM
тАО03-12-2002 01:30 PM
Re: WHAT DID I DO WRONG
this message is for shabu..
Would you please clarify your question a little bit for me " able to start oracle as oracle user"...??
To answer your question , I wasn't able to use
sqlplus to log in at all?
this is what i did
sqlplus /nolog
sql> connect system/manager as SYSDBA;
it gave this error message :
ORA-12705: invalid or unknown NLS parameter value specified
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2002 01:58 PM
тАО03-12-2002 01:58 PM
Re: WHAT DID I DO WRONG
Deanna,
What happens when you login as oracle and try to start the oracle database using dbstart ?
What is the output of:
ps -ef|grep oracle
I would first try to startup the database manually and then when everything works I would setup the startup scripts (/sbin/init.d/db.ora)
Also I am not sure if oracle 9i has the srvrmgrl utility, if it has then I would try starting the database using srvrmgrl.
As oracle:
srvrmgrl
SRVRMGRL>connect internal
SRVRMGRL>startup
SRVRMGRL>exit
-Shabu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2002 02:05 PM
тАО03-12-2002 02:05 PM
Re: WHAT DID I DO WRONG
How would you start up the database manually?
ps -ef | grep ora
> give me back nothing
sqlplus internal
ask me for the password???
I really need to have this thing running??
Please help