Path: newssvr20.news.prodigy.com!newsmst01a.news.prodigy.com!prodigy.com!news.glorb.com!wn52feed!worldnet.att.net!attbi_s03.POSTED!not-for-mail
Reply-To: "Jim Kennedy" <kennedy-downwithspammersfamily@attbi.net>
From: "Jim Kennedy" <kennedy-downwithspammersfamily@attbi.net>
Newsgroups: comp.databases.oracle.server,comp.databases.oracle.misc
References: <c6if9f$hn0$1@reader1.imaginet.fr>
Subject: Re: Execute a batch file from a trigger or a SP?
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <ZR4jc.22645$0u6.4015931@attbi_s03>
NNTP-Posting-Host: 24.20.5.156
X-Complaints-To: abuse@comcast.net
X-Trace: attbi_s03 1082972665 24.20.5.156 (Mon, 26 Apr 2004 09:44:25 GMT)
NNTP-Posting-Date: Mon, 26 Apr 2004 09:44:25 GMT
Organization: Comcast Online
Date: Mon, 26 Apr 2004 09:44:25 GMT
Xref: newssvr20.news.prodigy.com comp.databases.oracle.server:260152 comp.databases.oracle.misc:137871


<grille11@yahoo.com> wrote in message
news:c6if9f$hn0$1@reader1.imaginet.fr...
> Hello,
>
> I am trying to execute a batch file (containing a rundll32 command line)
> using a trigger or a stored procedure.
> Here is a trigger with which I retreive a variable (@nDocID) that I want
to
> use in my SP (sp_batch).
>
> Declare @nDocID Integer
> Declare @doctypeID Integer
> Select @nDocID = doc_id
> From Updated
> IF @doctypeID <> @nDocID
> Begin
>  exec sp_batch @nDocID
> End
>
> and my sp looks like this:
> rundll32 c:\app\file.dll,Function
>
> In SQL we can use EXEC master..xp_cmdshell sp_batch @nDocID
> Would there be an equivalent?
>
> I hope someone will be able to bring light to my darkness
>
> thanks
>
>

There is no such command in SQL (Structured Query Language).  There may be a
command in MS Sql Server's dialect of SQL.  You can do this in Java and load
the Java program into Oracle.  See asktom.oracle.com and do a search.
Jim


