Display error if DTS pacjkage doesn't execute -
03-07-2006
, 02:23 PM
I execute DTS packages through a stored procedure. I create a Job then
execute the DTS through there like this:
set @cmd = '"C:\PROGRAM FILES\MICROSOFT SQL SERVER\80\TOOLS\BINN\Dtsrun.exe"
/S "(local)" /N "' + @dts + '" /ADatabaseName="'+ @DatabaseName +'" /W "0"
/E '
However what I am not sure how to do is get the error returned and print it
from the Stored Proc if the DTS failed . In my case violation of the primary
Key will cause the DTS to fail if executed with the above manner
Thanks,
Leo |