I have a .dtsx file (SSIS package) that downloads files from an FTP server and imports data. It works fine when I run it manually. However, when I plan to invoke the package as a step in the task of the SQL server agent, it fails. The step with which it exits is where I call the .bat file. An error in the job history viewer says the following:
Error: 2009-05-26 12: 52: 25.64Code: 0xC0029151 Source: Executing a batch file Executing a process taskDescription: Executing "D: \ xxx \ import.bat" "to", the process exit code was "1", in while expected “0.” DTExec termination error: Return packet DTSER_FAILURE (1).
I think this is a permissions issue, but I'm not sure how to solve this. The job owner is an admin user, so I checked that they have rights to the directory in which the .bat file is located. I tried to log into Services and changed the "Logon" setting for SQL Server Agent, and none of them work ("Local System Account" and "This Account"). Anyone have any ideas on what other permissions need to be adjusted to make this work?
SQL Job, . , , , , .bat , windows/system32, .
system32, , . , (, .bat), WorkDirectory. , , , .bat, .
. " → ", SQLAgentUser. C:\temp. "" " ".
SSIS SSIS?
. (, script). , , - , SSIS script. ,
, , script SSIS, ( , script ).
runas . , . , , "echo% ERRORLEVEL%".
, SSIS , ?
, .bat ? , , UNC-.
I had the same error, and I resolved it by logging into the user account that runs the task, opened the Coreftp site there, checked the access to the site, made changes there (in my case, I had to re-enter the new password), and now it's working. So yes, this is a file access issue. This is the access file for the coreftp site in question.
Source: https://habr.com/ru/post/1709133/More articles:How to speed up Java DatagramSocket? - javaHow to raise events from VB.Net ClassLibrary / UserControl (ActiveX) to JavaScript? - javascriptEclipse cross compilation ... how can I do this? - cIdeas for developing a secure, low cost method to validate client-side results - securityUbuntu Eclipse Version - eclipseValgrind automated tests - are they used somewhere? - profilingSVN Weirdness: Is It Possible Not My Mistake - svnDisable IE invitation for keberos - internet-explorerChanging / changing the IP address for testing on the local machine - httpWrite content from server if JavaScript is not enabled - javascriptAll Articles