September 10, 2003 at 1:15 pm
I have written a pkg to read a file from a directory on the DB server. I've created an ActiveX script to use FSO to determine if any files exist in the directory. When running the DTS pkg using the play button, the script will run ok however, when I use the dtsrun utility (within a Job) the pkg fails with "path not found" error. The id the job uses to run the package is an administrator on the DB server machine.
If anyone has any suggestions please let me know.
A portion of the code is attached below;
NOTE:
Code fails on line #3
Value of gvFileLocation is "\\SrvrName\\D$\CMSReporting\Data\AHT_Skilled"
Code:
1.set pkg = DTSGlobalVariables.Parent
2.set fso = CREATEOBJECT("Scripting.FileSystemObject")
3.set fold = fso.GetFolder(DTSGlobalVariables("gvFileLocation").Value)
The following is the command line used within the job step:
dtsrun /S SrvrName /N CMS_Load_AHT_Skill /E
Edited by - marksg on 09/10/2003 1:59:07 PM
September 10, 2003 at 4:57 pm
It still sounds like a security issue to the path. You say the account is a local admin on the DB server but does it have access to the file directory?
Sorry if you already checked this but that is the indication from the error. Thanks.
David
David
@SQLTentmaker“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
September 10, 2003 at 5:04 pm
Well if the value for gvFileLocation is typed correctly, then you have an extra '\' after the server name. It should be,
\\SrvrName\D$\CMSReporting\Data\AHT_Skilled
Hope this helps
Phill Carter
--------------------
Colt 45 - the original point and click interface
--------------------
Colt 45 - the original point and click interface
September 11, 2003 at 5:13 am
Yes,the id does have access to the directory path.
The value of gvFileLocation is typed incorrectly in the posting it really is:
Value of gvFileLocation is "\\SrvrName\D$\CMSReporting\Data\AHT_Skilled"
September 11, 2003 at 8:29 pm
Also, make sure the userid has read/write access to the folder. Our IT guys recently spent a few hours tearing their hair out trying to find out why I was getting access denied errors in my DTS package. They eventually found that for some reason the user had been specifically denied access to the folder.
Have you tried using the FolderExists or GetAbsolutePathName methods?
Hope this helps
Phill Carter
--------------------
Colt 45 - the original point and click interface
Edited by - phillcart on 09/11/2003 8:32:38 PM
--------------------
Colt 45 - the original point and click interface
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply