Alas, I'm until recently a prisoner of windows & so I can't speak to shell
scripts.  On windows I'd probably try a windows script host vbscript like
so:

<warning = "air code">
====================================================================
Option Explicit
Dim WinShell
Dim jobImmediate
Dim StartTime
Dim ImmediateFailed
Const WaitMinutes = 15

Set WinShell = CreateObject("WScript.Shell")
ImmediateFailed = False
StartTime = Now
Set jobImmediate = WinShell.Exec(<<call to sqlplus w/shutdown immediate
script>>)

Do While jobImmediate.Status = WSHRunning
   WScript.Sleep 5000
   If DateDiff("n", StartTime, Now) > WaitMinutes And Not ImmediateFailed
Then
      jobImmediate.Terminate
      ImmediateFailed = True
   End If
Loop

If ImmediateFailed Then
  <<similar code attempts a shutdown abort script>>
End If
====================================================================
</warning = "air code">

I would guess that you could do something similar w/perl...

Cheers,

-Roy

Roy Pardee
Programmer/Analyst
SWFPAC Lockheed Martin IT
Extension 8487 
-----Original Message-----
Sent: Thursday, April 03, 2003 11:24 AM
To: Multiple recipients of list ORACLE-L


> -----Original Message----- 
> From: Pardee, Roy E [mailto:[EMAIL PROTECTED] 
> 
> I would 
> have guessed 
> that optimally, you'd try immediate first & then abort if 
> immediate takes 
> too long. 
I've read that some people on the list have done this. I am curious as to
how this is implemented. 
How long is too long? And how is this coded? I'm trying to think how you
would write this with shell scripts for example.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Pardee, Roy E
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to