From: "Sybrand Bakker" <postbus@sybrandb.demon.nl>
Newsgroups: comp.databases.oracle.misc
Subject: Re: SQL command to determine if DB is open
Date: Wed, 8 Aug 2001 18:31:41 +0200
Message-ID: <997288304.16672.0.pluto.d4ee154e@news.demon.nl>
References: <6b0f7239.0108070910.40766f3f@posting.google.com> <SoVb7.27727$jA2.1939219@news20.bellglobal.com> <6b0f7239.0108080617.5e6e3a52@posting.google.com>
NNTP-Posting-Host: sybrandb.demon.nl
X-NNTP-Posting-Host: sybrandb.demon.nl:212.238.21.78
X-Trace: news.demon.nl 997288304 pluto:16672 NO-IDENT sybrandb.demon.nl:212.238.21.78
X-Complaints-To: abuse@nl.demon.net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Lines: 29



"Andy Weiss" <amw157@aol.com> wrote in message
news:6b0f7239.0108080617.5e6e3a52@posting.google.com...
> > If I understand you correctly, how about using something like the
 v$instance
> > view (described next)
>
> I guess I should  have been more specific.  I need to do this from
> within a batch file.  In other words, if the database is open, do
> these steps; if the database is not open, do these other steps.
>
> I don't think v$instance will do the trick for me.  I need a statement
> that returns to me a boolean or an integer that tells whether the
> result of the statement was true or false.
>
> Andy


As usual posting a  platform and a version is usually helping tremendously
in getting responses.
Now I have to search for my crystall ball.
In Unix a simple ps -ef | grep PMON  would do

Regards,

Sybrand Bakker, Senior Oracle DBA




