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: Hans Forbrich <forbrich_at_yahoo.net>
Date: Mon, 13 Sep 2004 04:01:07 GMT
Message-ID: <7Y81d.202938$X12.113847@edtnps84>


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!)
>> 

>
> 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...)

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):

  1. JMS <-> AQ
  2. Java Stored Procedure call out to a Java listener, as shown in Workflow
  3. ExtProc, possibly called from a scheduled job
  4. simple http request to mod_plsql
  5. variant of Oracle networking's TAF (sample in the JDBC samples at OTN)
  6. dbms_job >> utl_smtp | utl_tcp | utl_file/dbms_output
  7. check whether log files have been written in the past 5 seconds
  8. check (equiv to tail) alert.log etc.

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

Original text of this message

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