Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: QUESTION: Latest CPU thinks I have a db running

Re: QUESTION: Latest CPU thinks I have a db running

From: <frank.van.bortel_at_gmail.com>
Date: 15 Mar 2006 02:30:48 -0800
Message-ID: <1142418648.792993.244140@u72g2000cwu.googlegroups.com>

BD schreef:

> Follow-up:
>
> I found a metalink note outlining what the patch process does. The
> following code appears to only check for the existence of an init.ora
> file in the /dbs directory of the home being patched.
>
> I like the note that there's "no foolproof way to determine this"
>
> In my installation, the init files for each db are held in a
> db-specific admin directory, and we use symlinks in the dbs directories
> instead of the actual files.
>
> So perhaps this 'error' can be ignored?
>
> check_instance(){
> #================================================================
> #Verify that no database is running, this is ok for pre 8i, however
> #at 8i and after there is no fool proof way to determine this with
> #100% confidence...
> #
> if $SHUTDOWN; then
> SIDLIST=/tmp/$$
> ps -ef | grep smon | grep -v grep | cut -d_ -f3 > $SIDLIST
> for sid in `cat $SIDLIST`
> do
> if [ -f $ORACLE_HOME/dbs/init$sid.ora ]; then
> echo "Seems that some databases in $ORACLE_HOME are active"
> echo "Patch installation aborted"
> echo "Found instance: $sid open"
> rm $SIDLIST
> exit 1
> fi
> done
> rm $SIDLIST
> fi
> }

What the above script does, is check whether there are processes running (the SMON process, in particular), which are a tell-tale sign of running instances.
That list is compared against the init.ora file - if there's a match the conclusion is that the ORACLE_HOME location to be patched has a running instance.

So, it's not merely a check against the init.ora, it's a match for the processes running against the init.ora that belongs to it! Received on Wed Mar 15 2006 - 04:30:48 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US