Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to run *.bat file on NT from O8?
HOST is a client-side command (e.g., in SQL*Plus). If you want to
execute an operating system command from the Oracle server you will have
to set up the NT equivalent of a UNIX pipe or daemon and pass messages
to it.
I'm not familiar with the NT SDK, but a do-it-yourself approach using the NT command prompt might go something like this:
(1) Choose a directory to which the Oracle server will write messages
(2) Use the UTL_FILE package to write a file into this directory - the
file constitutes the message
(3) Have a BAT file running permanently in the background as a daemon,
which scans the directory at regular intervals for the presence of a
file (IF EXIST...)
(4) If the file is found then execute it
There are details here whose implementation I'm not sure about. For
example, how to make the BAT daemon wait for a specified #secs or mins
before re-scanning the directory;
NT doesn't have the equivalent of a UNIX "wait" command.
But I'm sure the general approach should work.
David J. Hazledine
Roche Products Limited
40 Broadwater Road
Welwyn Garden City
AL7 3AY
United Kingdom
Registration Number 100674
E-mail: david.hazledine_at_roche.com
Fax: +44 (0)1707 325666
Tel: +44 (0)1707 366166
--
Posted via Talkway - http://www.talkway.com
Exchange ideas on practically anything (tm).
Received on Thu May 20 1999 - 07:48:14 CDT
![]() |
![]() |