SQL 作业失败。作业由用户<用户> 调用。运行的最后一步是 step1
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16766416/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
The job failed. The job was invoked by user<user>. The last step to run was step1
提问by Teju MB
I have created SSIS package which is running successfully and dumping the data to the required place. But the same package results in the error when i run it through job. I googled n got these links but failed to get the way out-
http://social.msdn.microsoft.com/Forums/en-US/sqltools/thread/9034bdc4-24fd-4d80-ad8d-cc780943397a/
我已经创建了成功运行的 SSIS 包,并将数据转储到所需的位置。但是当我通过作业运行它时,相同的包会导致错误。我用谷歌搜索了这些链接,但没有找到出路 -
http://social.msdn.microsoft.com/Forums/en-US/sqltools/thread/9034bdc4-24fd-4d80-ad8d-cc780943397a/
http://www.progtown.com/topic390755-error-at-start-job-the-job-was-invoked-by-user-sa.html
http://www.progtown.com/topic390755-error-at-start-job-the-job-was-invoked-by-user-sa.html
Please suggest .
请建议。
采纳答案by billinkc
The screen captures are great but the detail is going to be on the sublines, so in the first picture, where you have expanded the [+] sign and it says "Executed as user X. Unable to open Step output file"
屏幕截图很棒,但细节将在子行上,因此在第一张图片中,您已展开 [+] 符号并显示“以用户 X 身份执行。无法打开 Step 输出文件”
If you select that row, there is generally more detail displayed in the bottom pane.
如果选择该行,底部窗格中通常会显示更多详细信息。
General trouble shooting for something working in BIDS/SSDT but not in SQL Agent
在 BIDS/SSDT 中工作但在 SQL Agent 中不工作的一般故障排除
That said, generally when something works in BIDS/SSDT and does not in the SQL Agent, then the first thing to look at is the difference in permissions. You are running the package in visual studio and yourcredentials are used for
也就是说,通常当某些东西在 BIDS/SSDT 中起作用而在 SQL Agent 中不起作用时,首先要考虑的是权限的差异。您正在 Visual Studio 中运行该包,并且您的凭据用于
- File System
- Database (unless a specific user and pass are provided)
- General SaaS (Send Mail Task will use some mail host to transfer the email)
- 文件系统
- 数据库(除非提供了特定用户和通行证)
- 通用SaaS(发送邮件任务会使用一些邮件主机来传输邮件)
Running things in a SQL Agent job can complicate things as you now have the ability for each job individual job step to run under the SQL Agent account or a delegated set of credentials your DBA has established.
在 SQL 代理作业中运行事物可能会使事情复杂化,因为您现在可以在 SQL 代理帐户或 DBA 建立的一组委托凭据下运行每个作业的单独作业步骤。
Further complicating matters are network resources---my K:
drive might be mapped to \\server1\it\billinkc whereas the SQL Server Agent Account might have it mapped to \\server2\domainAccount\SQLServer\ or it might be entirely unmapped.
更复杂的问题是网络资源——我的K:
驱动器可能映射到 \\server1\it\billinkc 而 SQL Server 代理帐户可能将它映射到 \\server2\domainAccount\SQLServer\ 或者它可能完全未映射。
As Gowdhaman008 mentioned, there can also be a 32 vs 64 bit mismatch. Generally this is specific to using Excel as a source/destination but also rears its head with other RDBMS specific drivers and/or ODBC connections for said resources.
正如 Gowdhaman008 所提到的,也可能存在 32 位与 64 位不匹配。通常,这特定于使用 Excel 作为源/目标,但也与其他 RDBMS 特定驱动程序和/或所述资源的 ODBC 连接有关。
Specific to your example
具体到你的例子
Based on the fragment of the error message, my primary assumption is that the account CORP\CORP-MAD$
does not have access to the location where the file has been placed. To resolve that, ensure the MAD$ account has read/write access to the location the Happy files have been placed. Since that account ends in $, it might only exist on the computer where SQL Agent is running. If it's accessing a network/SaaS resource, you might need to create an explicit Credential in SQL Server (under Security) and then authorize that Credential for SSIS subtasks.
根据错误消息的片段,我的主要假设是该帐户CORP\CORP-MAD$
无权访问放置文件的位置。要解决此问题,请确保 MAD$ 帐户对放置 Happy 文件的位置具有读/写访问权限。由于该帐户以 $ 结尾,因此它可能只存在于运行 SQL 代理的计算机上。如果它正在访问网络/SaaS 资源,您可能需要在 SQL Server 中创建一个显式凭据(在安全下),然后为 SSIS 子任务授权该凭据。
A secondary, less likely, possibility is that the files don't exist and that's just a weird Send Mail error. I know I still get plenty of hits on The parameter 'address' cannot be an empty stringeven though an email address is provided.
次要的,不太可能的可能性是文件不存在,这只是一个奇怪的发送邮件错误。我知道即使提供了电子邮件地址,我仍然在参数“地址”不能为空字符串上获得大量点击。
回答by Gowdhaman008
I am assuming that it is running in BIDS, not in SQL Agent job. I faced this kind of problem and set the package property in the agent job as following screenshot[checked the Use 32 bit runtime
] and it worked for me.
我假设它在 BIDS 中运行,而不是在 SQL Agent 作业中运行。我遇到了这种问题,并按照以下屏幕截图在代理作业中设置了包属性[检查了Use 32 bit runtime
],它对我有用。
Hope this helps!
希望这可以帮助!