Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: dbshut script - shutdown or shutdown immediate

RE: dbshut script - shutdown or shutdown immediate

From: Pardee, Roy E <roy.e.pardee_at_lmco.com>
Date: Thu, 03 Apr 2003 13:08:41 -0800
Message-ID: <F001.00579D43.20030403130841@fatcity.com>


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:roy.e.pardee_at_lmco.com]
>
> 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: roy.e.pardee_at_lmco.com

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: ListGuru_at_fatcity.com (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).
Received on Thu Apr 03 2003 - 15:08:41 CST

Original text of this message

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