Tuesday, December 4, 2012

XML file parsing in DTS




Here my requirement was to fetch an XML file from a physical location and send that XML data to SQL server and then SQL server will parse those data and save those into DB.
 

For this I have done the following steps

1. Created a Global variable in the DTS (Menu->Package->Properties)



2. I have added an ActiveX Script Task which will read the XML file from physical 
    location and assign the XML file content inside the global variable created earlier.



3. Then Created an Execute SQL Task to call the stored procedure with the global 
    variable 


4. The stored procedure will parse that XML and save into DB