Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: oradim - return codes??
Mark Bole wrote:
>
>>>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!) >>
So you are confirming that oradim (a Windows-ism) and 'ps -ef' / 'ps -aux' (a *nix-ism) will not natively be found on the same OS.
Thanks for confirming that - I wondered whether someone had changed an OS on me [again] while I wasn't looking.
>
> 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.
>
Ummmm - why not 'select count(*) from dual;' from a regular user (not a dba)? I realize that doesn't confirm r/w for the database, but it will check whether it's open. (Or even, just connect? After all, OP just wants to confirm oradim worked.)
However, my personal preference to the OP's issue would be to evaluate & use one or more from the following (iirc all of which are available in standard edition):
And also - make sure these kinds of operations are truly needed ... and ask why a simple OEM event/fixit-job won't do using Oracle's built-in & 'no extra charge, at least to 9iR2' capability. Received on Sun Sep 12 2004 - 23:01:07 CDT