Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Package Runs but not by Agent Job

Author  Topic 

RicherR
Starting Member

2 Posts

Posted - 2014-09-10 : 07:25:57
I have 2 packages each one loading a file into SQL. Both packages run when called directly. Both have SQL Agent Jobs set up running under exactly the same creator and 'Run as' user on the step. The files for both jobs are loaded from exactly the same location.
However one job runs and the other fails with the message "Connection manager "TempLoad1" Description: The file name property is not valid. The file name is a device or contains invalid characters."
The package that works references an xls file (called VALUATIONSCurr.xls) and the package that fails references a csv file (called TempLoad.csv)
Both packages build the file path and name using configuration variables (stored in the SQL table) in a script task
On the failing package I have added another SQL task that takes the file name that has been built and inserts a record into a table showing the value. This step works and the value is as it should be (when I copy the value into explorer the file opens correctly

ahmeds08
Aged Yak Warrior

737 Posts

Posted - 2014-09-11 : 08:46:45
are you able to preview the data in ssis connection manager for TempLoad.csv. and also check if the service account running the package has access permission to the directory containing the csv file.

Javeed Ahmed
Go to Top of Page

RicherR
Starting Member

2 Posts

Posted - 2014-09-11 : 09:24:40
The package runs fine in BIDS (Visual Studio) and you can see all the data. The package runs fine when called directly from SSIS. It is only when the package is called from a Job.
The Job step is run under a proxy account.
The file is actually created by a Script Task in the SAME package. The file definately closed. The Script Task (that runs before the Data Transfer Task) opens and reads from an original file, creates the new file and then moves the original file to another location. All these actions complete fine which proves the proxy does have permission to this location.
It is only when the Job tries to run the Data Transfer Task that the package falls over
Go to Top of Page
   

- Advertisement -