Using a variable to process all *.xml files using SSIS

断了今生、忘了曾经 提交于 2019-12-22 18:10:04

问题


I am new to SSIS package, so any help would be really appreciated. The SSIS code was built using the VS2005 and its setup as a SQL agent Job in the 2005 SQL Server. Now as we are migrating to 2016 SQL server we see that the same SQL agent Job fails. Hence we decided to rebuild the package using VS2012, to see if that would solve the issue.

Processes done on the Control Flow Tab:

Data Flow task:

Variables used:

we have used a ForEachLoop:

Errors Show in the Data Flow Task:

We are still not able to make out what's causing the issue, we also refereed the full step by step process given in the below link.

Click here!

If any more information is required I can provide that too!!

XML Source Editor Error:

XML Source Advanced Editor:

XML Source Components Tab:

XML Source Connection manager tab:


回答1:


  1. I'd rather use VS 2015 for packages targeting SSIS 2016.
  2. Your error comes from DataFlow task - XML Source. At Validation step, which occurs on Package Save, XML Source tries to open XML file using sXMLfilename variable value; the value of sXMLfilename at this moment in VS is the variable default value. Therefore, validation in Visual Studio fails and you see the error messages.
    To pass validation, XML source should be able to open both XML and XSD file. Check for these files at Developer's station, migrate files if necessary from your old server. For XML file you can use any valid XML input file, XSD schema should match it. Specify valid path to XML file as the default value for sXMLfilename variable.


来源:https://stackoverflow.com/questions/42062228/using-a-variable-to-process-all-xml-files-using-ssis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!