Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Execute a batch file from a trigger or a SP?
<grille11_at_yahoo.com> wrote in message
news:c6if9f$hn0$1_at_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 Received on Mon Apr 26 2004 - 04:44:25 CDT