[英]SSIS package fails when runs by sql job agent
I am in trouble with running SSIS packages in my etl process.我在我的 etl 进程中运行 SSIS 包时遇到了麻烦。
There is a table that includes etl steps with different types.有一个表格,其中包含不同类型的 etl 步骤。 ie Stored Procedure steps, cmd (copy-move files) steps, sending mail, SSIS steps.即存储过程步骤,cmd(复制-移动文件)步骤,发送邮件,SSIS 步骤。
A main Stored procedures runs these steps according to type of steps and logs begin-end times, errors etc. This main stored procedure is triggered by an sql server job.主存储过程根据步骤类型运行这些步骤并记录开始-结束时间、错误等。这个主存储过程由 sql 服务器作业触发。
When I scheduled this job, SSIS steps takes error which is below;当我安排这项工作时,SSIS 步骤出现以下错误;
Error: SSIS Error Code DTS_E_OLEDBERROR.错误:SSIS 错误代码 DTS_E_OLEDBERROR。 An OLE DB error has occurred.发生 OLE DB 错误。 Error code: 0x80040E4D.错误代码:0x80040E4D。 An OLE DB record is available. OLE DB 记录可用。 Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80040E4D Description: "Login failed for user 'server\user$'.".来源:“Microsoft SQL Server Native Client 11.0” Hresult:0x80040E4D 描述:“用户 'server\user$' 登录失败。”。
Yet, when I run this main procedure manually (with my windows user login) it runs successfully.然而,当我手动运行这个主程序时(使用我的 windows 用户登录)它运行成功。
I checked this running with proxy account, it didn't work for me.我用代理帐户检查了这个运行,它对我不起作用。 Because inside the sql server job, i run my main stored procedure not SSIS package.因为在 sql 服务器作业中,我运行我的主要存储过程而不是 SSIS package。
proxy account reference link;代理账户参考链接; https://www.mssqltips.com/sqlservertip/2163/running-a-ssis-package-from-sql-server-agent-using-a-proxy-account/ https://www.mssqltips.com/sqlservertip/2163/running-a-ssis-package-from-sql-server-agent-using-a-proxy-account/
It should work so long as your connection to the database is valid.只要您与数据库的连接有效,它就应该工作。 The error message is telling you that server\user$
is not a valid login.错误消息告诉您server\user$
不是有效的登录名。
If the SSIS Package is connecting to the DB with a username and password ( ie , a SQL user), then it should be straight forward to set up / configure the login to have access to the server and database where your proc resides, and when you next run the job it should be able to successfully execute the proc.如果 SSIS Package 正在使用用户名和密码(即SQL 用户)连接到数据库,那么它应该直接访问并设置您的登录名和驻留数据库你接下来运行它应该能够成功执行proc的作业。
If instead the SSIS Package is connecting with Windows Authentication, then you'll need to use a Proxy that specifies a Credential that references a Windows / Active Directory account with database access. If instead the SSIS Package is connecting with Windows Authentication, then you'll need to use a Proxy that specifies a Credential that references a Windows / Active Directory account with database access. In SSMS:在 SSMS 中:
Now when you kick off the job, your SSIS package should make a connection to the database using the windows account specified in the credential set up in step 1, which should be able to successfully execute the stored proc.现在,当您开始工作时,您的 SSIS package 应该使用 windows 帐户连接到数据库,该帐户应该能够成功执行步骤 1 中指定的存储过程。
does your package of SSIS any password?你的 package 的 SSIS 有密码吗? if not,set password for it.then edit your job and write password there too.如果没有,请为其设置密码。然后编辑您的工作并在那里输入密码。
If you have a password in your SSIS package, make sure that the ProtectionLevel is set to "EncryptSensitiveWithPassword".如果您的 SSIS package 中有密码,请确保将 ProtectionLevel 设置为“EncryptSensitiveWithPassword”。 If you use "EncryptSensitiveWithUserKey" then you'll be the only user who can run it.如果您使用“EncryptSensitiveWithUserKey”,那么您将是唯一可以运行它的用户。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.