Operating System - HP-UX
1834441 Members
2328 Online
110067 Solutions
New Discussion

Re: Oracle 9i startup error

 
jamshed
Frequent Advisor

Oracle 9i startup error

After cluster starting oracle instance not started, because script file use svrmgrl utility . But Ora 9i use sqlplus commands for starting. How can I fix this problem?
6 REPLIES 6
Mobeen_1
Esteemed Contributor

Re: Oracle 9i startup error

Jamshed,
I am not very sure of your question. If you are having problems starting Oracle, make sure that the following are ok

1. Look thru your inittab and make sure that
the startup for Oracle is present

2. Make sure that all your environment
variables are poiting properly

regards
Mobeen
Sanjay Kumar Suri
Honored Contributor

Re: Oracle 9i startup error

Modify the script file. svrmgrl no longer supported in 9i.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Eric Antunes
Honored Contributor

Re: Oracle 9i startup error

Hi,

Where you have something like that on your startup/shtudown DB script:

svrmgrl << EOT
connect internal;
startup;
quit
EOT

exit_code=$?
else

echo
echo "Shutting down database $DB_NAME ..."
echo

svrmgrl << EOT
connect internal;
shutdown $shutdown_mode;
quit
EOT

You should have now:

sqlplus << EOT
connect / as sysdba;
startup;
quit
EOT

exit_code=$?
else

echo
echo "Shutting down database $DB_NAME ..."
echo

sqlplus << EOT
connect / as sysdba;
shutdown $shutdown_mode;
quit
EOT
Each and every day is a good day to learn.
PAVIC Thierry
Frequent Advisor

Re: Oracle 9i startup error

The way give by Antunes seems look fine.

Since the 8i version svrmgrl would be replace with sqlplus, on 8i database the 2 tools could be used.
In 9i U should use sqlplus

In our shell, we use the folling thing

# -- Startup base
echo "- Action : `date +%H:%M:%S` : Startup ${L_Base}" >> ${L_FicLog}

sqlplus /nolog < connect sys/${L_PwdSys} as sysdba
shutdown immediate
startup
exit
EOC
Eric Antunes
Honored Contributor

Re: Oracle 9i startup error

I've also replaced "connect internal" by "connect / as sysdba" because I think the first connect is being discontinued...
Each and every day is a good day to learn.
R. Allan Hicks
Trusted Contributor

Re: Oracle 9i startup error

You are correct artunes connect internal went away on 9i.

If /etc/oratab has a 'Y' at the end of the line, $ORACLE_HOME/bin/dbstart will start your database. dbstart and dbshut check this file and terminate if they "see" anything other than Y. The last root.sh script sets up /etc/oratab.

If you want to start automatically on bootup, there should be

1.) /etc/rc.config.d/oracle that sets the variable ORACLE_START=1

2.) /sbin/init.d/oracle that contains the script to start oracle and print the cool messages that you see on the console when you start.

3.) A symbolic link Snnnoracle in /sbin/rc3.d that points to /sbin/init.d/oracle
where nnn is a number. The scripts starting with S in this directory are executed in alphabetical order when the system enters run level 3.

4.) /sbin/rc2.d has a symobolic Knnnoracle link also pointing /sbin/init.d/oracle. When you leave run level 3 for run level 2 the K scripts are run. The numbers for the K and the S scripts should add together to be 1000.
This way the last service started will be the first service stopped. (S900oracle and K100oracle for example)

These should have been created standard when Oracle installed. The only tweak I recommend is that you modify the dbshut script to do a shutdown immediate. A simple shutdown is too polite in that you have to wait for everyone to log off before it shuts down. PAVIC's tweak that echos the db startup time is a nice one too.

If you don't want Oracle to start at bootup, you might consider putting them at run-level 4. /etc/inittab is sets up your run level after boot (typically 3), but there is nothing to prevent root from changing the run level to 4, 5 or 6 to start additional services after boot.
"Only he who attempts the absurd is capable of achieving the impossible