Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to integrate several XML sources and sql server by ssis package.
but,how can I call the ssis package in stored procedure and return recordset?

Stored Procedure below
SQL
DECLARE @sqlcmd nvarchar(2000)
DECLARE @returncode int
SET @sqlcmd ='dtexec /f "D:\My Documents\Visual Studio 2005\Projects\merge\Package.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF  /REPORTING EWCDI '
EXEC @returncode = xp_cmdshell @sqlcmd
select @returncode


the stored procedure return this
I want to change return recordset like this

XML source like a webservice like this

How can I do that? thanks
Posted
Updated 21-Mar-12 17:41pm
v6

1 solution

Follow this
1) Add one SQL TAST EXECUTOR in SSIS package and add one output variable
2) Create SP which will return result like your second image but in XML format.
3) attach your SP output to outpout parameter in SSIS Task

Now when you will call this package from your SP it will return XML string then you can parse this XML and display expected result.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900