在登录到SQL Server的密码不匹配 [英] Password mismatch while logging to sql server

查看:452
本文介绍了在登录到SQL Server的密码不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,
我有一个传统的ASP应用程序,我有一个连接字符串来尝试连接到数据库。

我的连接字符串如下所示:

 提供程序= SQLOLEDB;数据源= MYPC \\ MSSQLSERVER;初始
 目录= MYDB;数据库= mydb的;用户ID =我;密码= 123

现在,当我访问DB虽然前面带我得到这个错误:

 的Microsoft OLE DB提供程序SQL Server错误'80040E4D
用户登录失败'我'。

我看着在SQL事件探查器,我得到这样的:

 用户登录失败'我'。原因:密码不匹配
 所提供的登录。 [客户端:其中,命名管道>]
 错误:18456,状态:8。

我已经试过:


  1. 检查100次,我的密码实际上是正确的。

  2. 尝试这样做:更改登录我CHECK_POLICY关闭(甚至不知道我为什么这样做)

  3. 启用此帐号的所有可能的权限SSMS。

更新:
4.我试过此连接字符串:提供程序= SQLOLEDB;数据源= MYPC \\ MSSQLSERVER;初始目录= mydb的;数据库= MYDB;集成安全性= SSPI

和我得到这个错误:


  

Microsoft OLE DB提供了SQL Server错误80004005
  无法登录所请求的开放mydb数据库。登录失败。



解决方案

在我的情况,我有一个连接字符串与SQL Server 2008 R2中的工作,但更新到SQL Server 2014年后,我收到提到的错误。下面是我原来的连接字符串样子:

 服务器= \\ SQLEX $ P $干燥综合征;数据库= mydb的;用户ID =我;密码= 123

下面是2014年的作品更新连接字符串:

 集成安全性= SSPI;数据源= \\ SQLEX $ P $干燥综合征;数据库= mydb的;用户ID =我;密码= 123

Alright, I have a classic asp application and I have a connection string to try to connect to db.

MY connection string looks as follows:

 Provider=SQLOLEDB;Data Source=MYPC\MSSQLSERVER;Initial
 Catalog=mydb;database=mydb;User Id=me;Password=123

Now when I'm accessing db though front-en I get this error:

Microsoft OLE DB Provider for SQL Server error '80040e4d'
Login failed for user 'me'. 

I looked in the sql profiler and I got this:

 Login failed for user 'me'.  Reason: Password did not match that
 for the login provided. [CLIENT: <named pipe>]
 Error: 18456, State:8. 

What I've tried:

  1. checked 100 times that my password is actually correct.
  2. Tried this: alter login me with check_policy off (Do not even know why I did this)
  3. Enable ALL possible permissions for this account in SSMS.

Update: 4. I've tried this connection string: Provider=SQLOLEDB;Data Source=MYPC\MSSQLSERVER;Initial Catalog=mydb;database=mydb; Integrated Security = SSPI

And I got this error:

Microsoft OLE DB Provider for SQL Server error '80004005' Cannot open database mydb requested by the login. The login failed.

解决方案

In my case, I had a connection string working with SQL Server 2008 R2, but after updating to SQL Server 2014, I received the mentioned error. Here is what my original connection string was like:

server=.\SQLEXPRESS;database=mydb;User Id=me;Password=123

Here is the update connection string that works with 2014:

Integrated Security=SSPI;Data Source=.\SQLEXPRESS;Database=mydb;User Id=me;Password=123

这篇关于在登录到SQL Server的密码不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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