如何在sql server 2008 r2中解决“用户'domain\username'登录失败” [英] How to solve “login failed for user 'domain\username'” in sql server 2008 r2

查看:572
本文介绍了如何在sql server 2008 r2中解决“用户'domain\username'登录失败”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,我需要从SQL Server 2008 R2数据库中获取数据。但是我收到了一个错误



用户域登录失败\用户名& ;



我用谷歌搜索它然后我得到它来改变SQL Server的属性 - >属性 - >安全 - >对SQL Server和Windows身份验证模式的服务器身份验证只会出现相同的错误。我不想在连接字符串中使用ID和密码



我尝试过:



连接字符串



< add name =DB_FRSConnectionString>

connectionString =数据源=服务器名称;初始值Catalog = databasename; Integrated Security = True

providerName =System.Data.SqlClient/>

I have a website where I need to fetch data from a SQL Server 2008 R2 database. But I'm getting an error

Login failed for user domain\Username&;

I googled for it then I get that to change property of SQL Server-> Properties -> Security -> Server authentication to SQL Server and Windows authentication mode only m still getting the same error. I dont want to use ID and password in connection string

What I have tried:

Connection String

<add name="DB_FRSConnectionString">
connectionString="Data Source=servername;Initial Catalog=databasename;Integrated Security=True"
providerName="System.Data.SqlClient" />

推荐答案

我会认为如何修复这个错误会非常简单。 Sql告诉你domain \ username不能登录到sql。您需要进入Sql server并为该帐户创建一个登录名。
I would think the "how to fix" this error would be very simple. Sql told you that domain\username could not log into sql. You need to go into Sql server and create a login for that account.


这篇关于如何在sql server 2008 r2中解决“用户'domain\username'登录失败”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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