SSIS 连接管理器登录失败 [英] SSIS connection manager login fails

查看:79
本文介绍了SSIS 连接管理器登录失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 SSIS 项目,我在其中定义了一个数据源(提供程序:Native OLE DB/Microsoft OLE DB Provider for SQL Server).当我手动打开它并点击测试连接"按钮时,一切正常.连接管理器可以使用连接字符串、用户和密码访问数据库.

I have an SSIS project wherein I defined a Data Source (provider: Native OLE DB/Microsoft OLE DB Provider for SQL Server). When I open this up manually and hit the button "test connection" all works fine. The connection manager can access the DB using the connection string, user and password.

现在我有一个 SSIS 包,我在其中创建了一个基于此数据源的连接管理器(来自数据源的新连接...").

Now I have an SSIS package where I created a connection manager based on this data source ("new connection from data source...").

在包控制流中,我有一个 SQL 任务,它的连接类型为 OLE DB,并且连接设置为我在这个包中的连接管理器.该任务向数据库发出一些更新语句,一点也不奇怪.

In the package control flow I have an SQL task which has connection type OLE DB and connection is set to my connection manager within this very package. The task fires some update statement to the database, noting fancy at all.

现在,当我调试整个过程时,总是出现相同的错误:

Now when I debug the whole thing I always get the same error:

错误:SSIS 错误代码 DTS_E_OLEDBERROR.发生 OLE DB 错误.错误代码:0x80040E4D.OLE DB 记录可用.来源:"Microsoft OLE DB Provider for SQL Server" Hresult: 0x80040E4D描述:用户‘myUser’登录失败."

Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80040E4D Description: "Login failed for user 'myUser'."

仅供参考:myUser 等于我的数据库用户名.

FYI: myUser equals the user name I have for my database.

所以我的问题是:我在这里错过了什么?我真的看不出这里有什么问题.我真的被困在这里了.非常感谢任何提示!

So my question is: what am I missing here? I really can't see what's wrong here. I'm really stuck here. Any hints greatly appreciated!

推荐答案

ProtectionLevel "DontSaveSensitive" 意味着密码根本不会与 SSIS 包一起保存.SSIS 这样做的原因是密码不会在其他人可以获得的地方浮动.

ProtectionLevel "DontSaveSensitive" means the password won't get saved with the SSIS package at all. The reason SSIS does this is so that the password isn't floating around where someone else could get it.

因此,当您输入密码并点击测试连接"按钮时,一切正常.但是当您在调试模式下(或在生产中)运行时,您没有密码.因此,当然登录失败.

So when you type in the password and hit the button "test connection" it all works fine. But when you run in debug mode (or in production), you don't have a password. Therefore, of course, the login fails.

这就是您需要配置文件的原因.在此处查看我的答案:

This is why you need a configuration file. See my answer here:

您为连接字符串创建了一个配置文件,但是密码也不会保存到配置文件中.你会如果要包含配置文件,则必须手动编辑配置文件密码.但最好的方法是配置密码当您安排执行 SSIS 包的作业时.那保持密码在一个安全的地方,它不会到处飘带有 SSIS 包的地方.

You create a configuration file for the connection string, but the password won't get saved to the configuration file either. You will have to edit the configuration file manually if you want it to include a password. But the best way to do this is to configure the password when you schedule the job that executes the SSIS package. That keeps the password in a safe place, and it isn't floating around all over the place with the SSIS package.

当然,在调试时,您需要一个手动输入密码的配置文件.但是该配置文件在部署到生产环境时并不随包一起使用.生产配置文件应该有一个空白密码.密码应该存在于执行包的预定作业中.

While you are debugging, of course, you need a configuration file that has the password manually typed into it. But that configuration file doesn't go with the package when it's deployed to production. The production config file should have a blank password. The password should live in the scheduled job that executes the package.

这篇关于SSIS 连接管理器登录失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆