August 20, 2008 at 9:15 am
Hi,
cannot seem to figure this one out. I have a ssis package that calls a bat file which uses sftp to pull files from a remote server. The bat file runs correctly when i call it using the sql server agent account . The bat file runs fine when i call it from the ssis package when i am logged in as the sql server agent account. However when i call the package from a sql job nothing happens and the files don't get downloaded. I tried calling the package from job using dtexec and again it didn't work but it worked when i called it from the command prompt
points
the account used is the one that runs the sql server agent account
The bat file is straight for bat file nothing unusual
The account has permissions to write the files to the location choosed.
Please any suggestions would help. I am currently checking using filemon if the bat file is been hit.
August 20, 2008 at 9:33 am
Ummm, seeing as you have tried everything, I am rather stumped. The path to the file, it is fully qulified?
From agent, can you setup a step which a OS commend and run soemthign like MD "fullpath\ANewFOlder"
?
Is the folder created?
Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!
August 20, 2008 at 9:40 am
Hey,
thanks for the reply. Yes the folder is created and the path is fully Qualified and everything is permissioned. I was however reading on another forum that in the executable you need to put "C:\windows\......\cmd.exe" and for the argument put your bat file. Is this correct? I am waiting on the sa guys here to install filemon for me so i can see if the bat file is been at least called. That said if the ssis package when called directly hit the bat file then the sql job should as well. Maybe these are dangerous presumptions...
August 20, 2008 at 9:48 am
re full path to cmd - not at all. I use the path to the bat file.
Have you got the Widow Style to hidden. Might be a conflict with lack of GUI something or other.
I have never tried it any other way but hidden.
Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!
August 20, 2008 at 9:54 am
just a thought - how about another batfile which does a MD or something else simple. Rulle out any prompting from your file.
Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!
August 20, 2008 at 9:58 am
Hey,
your a step ahead of me. Will put mkdir in the bat file at the top and call it from a job. Problem here is everything is so locked down so to get small task done i need to raise a small army first. will have an update for you tomorrow ...Have to say its a strange one
by the way the forum link related to full path to cmd is below
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1860049&SiteID=1
August 20, 2008 at 10:00 am
I disagree with Phill onn that one. I have many cases where it is working just fine with the full path to the bat file.
In anycase - I can here the cold beer calling my name. I'm off...
Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply