I don't think you should try to do xp_cmdshell from the Trigger.
See
http://bytes.com/forum/thread81024.html (I just googled to confirm my statement).
http://www.sqlmag.com/Article/ArticleID/27192/sql_server_27192.htmlhttp://en.allexperts.com/q/MS-SQL-Server-1801/sql-server-2005-trigger.htm>Hi All,
>
> We still are having problems, and everything suggested so far has not worked.
> We have a TRIGGER on a table for insert. When it inserts a record (at the moment), it is suppose to print the call string so that we can be sure that it is correct, then do shellexe to the vfp dll we have made. At the moment, the only thing the dll does is create a file that contains the parameters passed by the calling program, in this case, SQL Server.
> The problem is that the trigger does not print the call string, and says running query, until we kill the vfp dll, then it shows the call string.
>
> If we take the call string into a DOS command window, and hit enter, the vfp dll runs and quits, like it is suppose to and we get a prompt back.
>
> Why would SQL Server Trigger / VFP not work, while Dos/vfp does?
>
> We are using a vfp 8 exe.
>
>TIA
>Beth
If it's not broken, fix it until it is.
My Blog