简体   繁体   English

SQL Agent Job不执行SSIS包,但不会失败

[英]SQL Agent Job doesn't execute SSIS package, but doesn't fail

I set up a job to run a SSIS package in the SSIS Catalog, but the SSIS package doesn't start. 我在SSIS目录中设置了一个运行SSIS包的作业,但是SSIS包无法启动。 If I right-click the package and run it, it completes successfully. 如果我右键单击该程序包并运行它,它将成功完成。

When I look in the execution history of the package in the Catalog, there is no sign that it the package was even started by the job. 当我在目录中查看包的执行历史记录时,没有迹象表明该包甚至是由作业启动的。

I created a test package to make sure it isn't the specific package failing, so the package I'm testing with has a SQL Task that does a 'SELECT 1'. 我创建了一个测试包以确保它不是特定的包失败,因此我要测试的包具有执行“ SELECT 1”的SQL任务。 Still fails. 仍然失败。

The job just stays in the "Executing" state until I stop the job. 在我停止作业之前,作业一直处于“正在执行”状态。

I am running SQL Server 2014 Standard Edition, and running the job with a sysadmin account. 我正在运行SQL Server 2014 Standard Edition,并使用sysadmin帐户运行该作业。

Why is the SQL Agent Job not running my package? 为什么SQL Agent Job无法运行我的程序包?

Edit: I had a look through this article but it either doesn't apply or I gave it a shot and it didn't work either. 编辑:我浏览了这篇文章,但是它要么不适用,要么我试了一下,它也不起作用。

Edit 2: I found an error under the SQL Server Agent Job History: Unable to terminate process 1850 launched by step 1 of job 0x5DAD5416FA09C445B82ABDBB49F75E38 (reason: Access is denied) 编辑2:我在SQL Server代理作业历史记录下发现错误:无法终止由作业0x5DAD5416FA09C445B82ABDBB49F75E38的步骤1启动的进程1850(原因:访问被拒绝)

Does that mean my service account doesn't have enough permissions on the local machine? 这是否意味着我的服务帐户在本地计算机上没有足够的权限? However, I AM able to run the job with DTEXEC using the service account without issues... 但是,我可以使用服务帐户使用DTEXEC运行该作业,而不会出现问题...

When you look at the connections in the SSIS package, did you put in a user id and password? 当您查看SSIS包中的连接时,是否输入了用户ID和密码? If so, did you add a package password? 如果是,您是否添加了包裹密码? The reason I ask is that if you don't add a package password, it will strip out things it thinks should be secure (like passwords). 我问的原因是,如果您不添加软件包密码,它将删除它认为应该安全的内容(例如密码)。 You might want to try putting the connection password in a configuration file, and add that file to the job. 您可能想要尝试将连接密码放入配置文件中,然后将该文件添加到作业中。 Either that or password encrypt the SSIS package but you will have to take special care when you run the package for the first time (or when you create the job) because you will need to provide the password that you used to encrypt the package. 可以使用该密码或密码对SSIS软件包进行加密,但是第一次运行该软件包(或创建作业时)必须特别小心,因为您将需要提供用于加密该软件包的密码。

Reboot fixes this issue. 重新启动可解决此问题。 Reason is because if you look at this message. 原因是因为如果您查看此消息。 Unable to terminate process 1850. That is a windows process. 无法终止进程1850。这是Windows进程。 I would say reboot. 我会说重启。 If you really like to enquire before rebooting. 如果您真的想在重新启动之前查询。 You could use sysinternals process explorer. 您可以使用sysinternals进程浏览器。 Download it and use that to find process id 1850 which may be hung process in windows. 下载它并使用它来查找进程ID 1850,该进程ID可以在Windows中挂起。

Thanks Ali 谢谢阿里

I have also faced this scenario many times but when I checked running the package manually,its completing successfully because I was using for each loop container and sequence container as well.In both cases for each loop and sequence were completing without validating other ones.So I checked precedence constraint and change it,Now it working and all the component ran successfully. 我也多次遇到这种情况,但是当我检查手动运行该程序包时,它成功完成了,因为我也使用了每个循环容器和序列容器。在两种情况下,每个循环和序列都在完成而未验证其他循环容器。我检查了优先级约束并进行了更改,现在它可以正常工作,并且所有组件都成功运行。 Sometimes we miss to choose appropriate precedence constraint, there are many option like on Success ,failure,completion and then for you can choose values from Constraint ,Expression,Expression AND Constraint and Expression OR Constraint . 有时我们错过了选择合适的优先约束的机会,有很多选项,例如Success,failure,completion ,然后您可以从Constraint,Expression,Expression AND ConstraintExpression OR Constraint中选择值。 Initially i was using Expression OR Constraint for success and now changed it to Expression AND Constraint , its working fine for me. 最初,我使用Expression OR Constraint来获得成功,现在将其更改为Expression AND Constraint ,对我来说很好用。 You also need to do this,it will definitely work please try and let me know. 您还需要执行此操作,它一定可以正常工作,请尝试让我知道。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM