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: oradim - return codes??

Re: oradim - return codes??

From: Mark Bole <makbo_at_pacbell.net>
Date: Mon, 13 Sep 2004 03:32:31 GMT
Message-ID: <jx81d.18909$wb7.16268@newssvr27.news.prodigy.com>


Hans Forbrich wrote:

> Gerry Sinkiewicz wrote:
>
>

>>"David" <goshengoogle_at_yahoo.com> wrote in message
>>news:c6a42c32.0409080726.2ed43d0b_at_posting.google.com...
>>
>>>I am executing 'oradim' from Java code 9using the system runtime
>>>package) to stop and start a 9.2.0.5 database instance.  I would like
>>>to capture the return code from oradim to determine the success or
>>>failure of the command.  I can find no documentation on return/status
>>>codes.  Can anyone help with this?  Thank you.
>>>
>>
>>It might be better to just check if the DB is running.
>>
>>grep for smon from a ps -ef.

>
>
> Curiosity gets the better of me ... oradim on the same machine as 'ps -ef'?
> (Pls explain!)
>

Not directly addressing the OP, but the Windows equivalent of "ps -ef | grep smon" (and really, "ps -ef" is Unix SVR4 syntax, not Unix BSD 4.x syntax, which uses "ps -aux" instead, although some Unices support both...)

Using a Windows Resource Kit utility...

c:\tmp> tlist | find "oracle.exe"
1644 oracle.exe

Now, addressing the OP, a much better and more portable approach is to not check return codes (after all, what if oradim succeeded but the database crashed moments later due to a startup error?).

Rather, pre-create a test table of some kind, then log in, update it, and commit. If the transaction fails at any step, or takes longer than a few seconds (you choose how many), then your read-write database most likely isn't open for business as you'd like. Works on any system that supports Java.

--Mark Bole Received on Sun Sep 12 2004 - 22:32:31 CDT

Original text of this message

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