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?
Is it possible to setup a client - server configuration on the server and
then use the HOST command?
The solution with a background daemon and using UTL_ FILE looks good too!
It will be a trigger on a OS file. Can be done with a C or Java program
deamon too.
Patrick
hazledid wrote:
> 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 Fri May 21 1999 - 04:06:16 CDT
![]() |
![]() |