Wednesday, June 4, 2008

dbstart -- can't find init file

Hello,

It was Oracle Database 9.2 on Linux, and dbstart script worked with error "Can't find init file for Database "DB1" Database "DB1" NOT started." :
==================================================
[oracle@DB1 ~]$ dbstart $ORACLE_HOME

Can't find init file for Database "DB1".
Database "DB1" NOT started.
[oracle@DB1 ~]$
==================================================
If you check $ORACLE_HOME/dbs/ directory, then there is spfile, but no pfile.
Solution was to edit dbstart script to let him understand any initializations files correctly.

To do it, add this line after line 55:
SPFILE=${ORACLE_HOME}/dbs/spfile${ORACLE_SID}.ora
and change line 116 to be:
if [ -f $PFILE -o -f $SPFILE ] ; then
That is all, now dbstart can see not only pfile, but spfile too, and working without problem.
8)

P.S.
Line 55 was:
PFILE=${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora
Line 116 was:
if [ -f $PFILE ] ; then


No comments: