SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Referencing XML File with VS vs. Deployed Package
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

qman
Constraint Violating Yak Guru

USA
439 Posts

Posted - 01/06/2014 :  09:58:00  Show Profile  Reply with Quote
I have a C# script task which references an external XML file which lives in the same .SLN project folder.

I am able to find the file and use its contents when running within Visual Studio 2008.

When I attempt to run the deployed package via SQL Server Studio, my package fails on the task which reads the XML file.

I tried referencing the XML file using both examples below....

Any ideas what's causing this?


doc.Load("E:\\SSIS_Source_Files\\Test_Data\\Test_Data\\myDoc.xml");

doc.Load("myDoc.xml");


Thanks!

Edited by - qman on 01/06/2014 09:59:07

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 01/07/2014 :  01:09:29  Show Profile  Reply with Quote
you need to put file in a shared folder and should use UNC path to reference it like
//machinename/drive$/....
Also if you're executing it from sql job, it gets run under service account. In that case, you should also give access to folder for service account for it to read the file.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

qman
Constraint Violating Yak Guru

USA
439 Posts

Posted - 01/07/2014 :  07:32:28  Show Profile  Reply with Quote
That did the trick, once again thanks!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 01/08/2014 :  06:04:30  Show Profile  Reply with Quote
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000