开发者

get ssis package output from SP

I have a SP that runs a SSIS package.

xp_cmdshell 'dtexec /f "F:\SSIS Package\test.dtsx" /Rep E'

When I run the SP in VS I get an Output window where I can see if it was successful. Is there a way to get the output from this into my asp.net application ?开发者_如何学Python


One practice I've often seen is to capture the results into a table. Something along these lines:

create table #dtexecOutput(varchar(4000))

insert into #dtexecOutput exec master..xp_cmdshell 'dtexec /f "F:\SSIS Package\test.dtsx" /Rep E' 

select * from  #dtexecOutput


Another option would be an output redirect to a file and then reading from the file:

exec master..xp_cmdshell 'dtexec /f "F:\SSIS Package\test.dtsx" /Rep E > output.log'

The name of the file should be dynamic and random enough.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜