Reputation: 1200
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 ?
Upvotes: 1
Views: 399
Reputation: 1608
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.
Upvotes: 0
Reputation: 16838
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
Upvotes: 3