问题
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:
- I'd rather use VS 2015 for packages targeting SSIS 2016.
- 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 ofsXMLfilename
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 forsXMLfilename
variable.
来源:https://stackoverflow.com/questions/42062228/using-a-variable-to-process-all-xml-files-using-ssis