简体   繁体   English

SQL Server SSIS中用户“ sa”的登录失败

[英]login failed for user 'sa' in sql server ssis

Working on the deployed SSIS Package .. Unfortunately SSIS job is failing while running that package .. I am getting Following Error; 正在部署的SSIS程序包上工作。。不幸的是,运行该程序包时SSIS作业失败。

NIGHTLYUPDATE_v3:Error: SSIS Error Code DTS_E_OLEDBERROR. NIGHTLYUPDATE_v3:错误:SSIS错误代码DTS_E_OLEDBERROR。 An OLE DB error has occurred. 发生OLE DB错误。 Error code: 0x80004005. 错误代码:0x80004005。 An OLE DB record is available. OLE DB记录可用。 Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Login failed for user 'sa'.". 源:“ Microsoft SQL Server本机客户端11.0”结果:0x80004005说明:“用户'sa'登录失败。”。 An OLE DB record is available. OLE DB记录可用。 Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Cannot open database "DB_DATA" requested by the login. The login failed.". 源:“ Microsoft SQL Server本机客户端11.0”结果:0x80004005说明:“无法打开登录请求的数据库“ DB_DATA”。登录失败。”。

I have researched on it but most of the solutions are to change the protection Level but is there any other way to resolve this issue .. 我已经对其进行了研究,但是大多数解决方案都是更改保护级别,但是还有其他方法可以解决此问题。

The easy way to fix it is to correct the connection string so that it uses a valid SQL UserName and Password. 修复它的简单方法是更正连接字符串,以便它使用有效的SQL用户名和密码。 Sounds like you currently have an incorrect password in the connection string. 听起来您当前在连接字符串中输入的密码不正确。

The best way to fix it is to use windows authentication and have the job run by a domain account that has all the necessary permissions to your database "DB_DATA". 解决该问题的最佳方法是使用Windows身份验证,并由对数据库“ DB_DATA”具有所有必要权限的域帐户运行该作业。

As you are saying the failure occuring at the SQL Server Job, it is best to look into assigning credentials followed by a proxy. 正如您所说的,在SQL Server作业中发生故障时,最好考虑分配凭据,然后再代理。 Use that proxy within the job definition while executing the package. 执行程序包时,在作业定义中使用该代理。 Additionally as best practise it is best to not use 'sa' account and create a domain account or SQL Server account. 此外,作为最佳实践,最好不要使用“ sa”帐户并创建域帐户或SQL Server帐户。

Here is the 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/

问题是db仅限于Single_user,我将其更改为Multi_user,它现在可以工作

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

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