Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different file save location when used as a scheduled job

Status
Not open for further replies.

kxramse

Programmer
Jul 28, 2006
75
US
I have an SSIS package that I created that looks like the following:

Code:
Execute SQL Task  [Determines the file name]

Data Flow Task
     Source - Query  [Grabs the data]
     Destination     [Saves data to file on network drive]

Send Mail Task       [Tells user to get file from network]

When I run this package inside Microsoft Visual Studio I get the results I want. It sends the file to the network drive and because there are SSN's in the file, it doesn't actually e-mail the file but puts it in a secure location for the person to get the file.

When I schedule this in SQL Server 2005 I get the file saved to: c:\windows\system32\dynamicfilename.csv

So somehow it is still able to determine what the file name should be, but instead of sending the file to the right destination when you run it through VS, it flops out and sends it to this wacky directory.

I've spent too much time on this and was wondering if someone can point me in the right direction without going to the extent of writing a script like this suggests. thread1555-1265108

Thanks,
Keith
 
Is the Source variable for the file hard coded into the project or set by a config file?



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
I don't know where I would set it in a config file. Also, it may not be hardcoded per se since you point to it in the destination file when you create it.
 
Let me ask this then. Have you enabled package configurations on your package?

If not, did you create this package yourself or did someone else? If you did and you don't recall creating a variable, then there's something else going on. If someone else did, go to View -> Other Windows -> Variables and see if there are any path variables set there that might be over riding what you set in the file connection manager.

Lastly, do you have read/write access to the actual share you're trying to save the file on? Or does the user running the package have that access?



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top