Tuesday, March 20, 2012

Processing OutPut from exec command

Hi,
I am using exec command command to run xp_cmdshell ext SP.
the command line string given to xp_cmdshell is for executing DTS Packages.
i want to process the out put returned by the exec command in my stored proc
Is it possible to capture the out put in addition of return code(0/1),which
is returned by xp_cmdshell, if yes then how?
thanks in advance
Kailux
declare @.e int
exec @.=master.dbo.xp_cmdshell ....
select @.e
"kailux4" wrote:

> Hi,
> I am using exec command command to run xp_cmdshell ext SP.
> the command line string given to xp_cmdshell is for executing DTS Packages.
> i want to process the out put returned by the exec command in my stored proc
> Is it possible to capture the out put in addition of return code(0/1),which
> is returned by xp_cmdshell, if yes then how?
> thanks in advance
> Kailux
|||declare @.e int
exec @.e=master.dbo.xp_cmdshell ....
select @.e
"kailux4" wrote:

> Hi,
> I am using exec command command to run xp_cmdshell ext SP.
> the command line string given to xp_cmdshell is for executing DTS Packages.
> i want to process the out put returned by the exec command in my stored proc
> Is it possible to capture the out put in addition of return code(0/1),which
> is returned by xp_cmdshell, if yes then how?
> thanks in advance
> Kailux

No comments:

Post a Comment