1849631 Members
6834 Online
104044 Solutions
New Discussion

Startup scripts

 
SOLVED
Go to solution
Praveen Bezawada
Respected Contributor

Startup scripts

Hi
As of 10.X the startup scripts cannot use any commands and libraries in /opt. Is it the same with 11.00. Actually i need to start oracle database during startup , oracle is installed in /opt/oraswr on my machine. Can I use startup scripts to start oracle at boot time.
Thanks in advance
Praveen
7 REPLIES 7
Robert Gamble
Respected Contributor

Re: Startup scripts

Take a look at this file: /usr/share/doc/file_sys.txt (see section three)

Also, see this thread: http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xecf95f260cafd4118fef0090279cd0f9,00.html

Good Luck!
James R. Ferguson
Acclaimed Contributor

Re: Startup scripts

Praveen:

Using /opt is not a problem as long as you have transitioned through run-level 1. The mounting of all volume groups is done via /sbin/rc1.d/S100localmount (in 10.20, at least), so by the time you reach level-3 (normally used for Oracle startup) you will be fine.

...JRF...
Kofi ARTHIABAH
Honored Contributor

Re: Startup scripts

Praveen:

You should make the your database startup script one of the last to be executed eg. S999database (in your /sbin/rc2.d) then you will be able to use commands in /opt - the reason is that this ensures that /opt is mounted (ie. all local filesystems are mounted) prior to attempting to start your database.
nothing wrong with me that a few lines of code cannot fix!
CHRIS_ANORUO
Honored Contributor

Re: Startup scripts

Take a look at this attached script.The startup script link is S980oracle and the shutdown script is K150oracle. Below is a sample part of the database startup script in dbstart in $ORACLE_HOME:

# instance specific startup section
ORACLE_SID=database_name export ORACLE_SID
svrmgrl <connect internal
startup
EOF
if [ $? -eq 0 ]; then
echo ""
echo "Database "${ORACLE_SID}" WARM started."
else
echo ""
echo "Database "${ORACLE_SID}" NOT started."
fi
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
CHRIS_ANORUO
Honored Contributor

Re: Startup scripts

Take a look at this attached script.The startup script link is S980oracle and the shutdown script is K150oracle. Below is a sample part of the database startup script in dbstart in $ORACLE_HOME:

# instance specific startup section
ORACLE_SID=database_name export ORACLE_SID
svrmgrl <connect internal
startup
EOF
if [ $? -eq 0 ]; then
echo ""
echo "Database "${ORACLE_SID}" WARM started."
else
echo ""
echo "Database "${ORACLE_SID}" NOT started."
fi
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Praveen Bezawada
Respected Contributor

Re: Startup scripts

Hi
when I do su - oracle -c script, though oracle is getting started properly, the message which I get on console is getting garbled. when i check the /etc/rc.log I get message saying
stty : : Not a typewriter
I think that .profile is getting executed when i do su - oracle and causing this error. What should I do fix this.
Thanks in advance
Praveen
Lasse Knudsen
Esteemed Contributor
Solution

Re: Startup scripts

Praveen,

I think this link will help you

http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x73e66c96588ad4118fef0090279cd0f9,00.html

In a world without fences - who needs Gates ?