用户 'sa' 登录失败。
用户'sa'登录失败。Description:Anunhandledexceptionoccurredduringtheexecutionofthecurrentwebr...
用户 'sa' 登录失败。
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: 用户 'sa' 登录失败。
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: 展开
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: 用户 'sa' 登录失败。
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: 展开
2个回答
展开全部
用户无法使用SQL Server的登录帐户(如 sa )进行连接.解决方法如下所示:
1.在服务器端使用企业管理器,并且选择"使用 Windows 身份验证"连接上 SQL Server
操作步骤:
在企业管理器中
--右键你的服务器实例(就是那个有绿色图标的)
--编辑SQL Server注册属性
--选择"使用windows身份验证"
--选择"使用SQL Server身份验证"
--登录名输入"sa",密码输入sa的密码
--确定
2.设置允许SQL Server身份登录
操作步骤:
在企业管理器中
--展开"SQL Server组",鼠标右键点击SQL Server服务器的名称
--选择"属性"
--再选择"安全性"选项卡
--在"身份验证"下,选择"SQL Server和 Windows ".
--确定,并重新启动SQL Server服务.
在以上解决方法中,如果在第 1 步中使用"使用 Windows 身份验证"连接 SQL Server 失败,
那就通过修改注册表来解决此问题:
1.点击"开始"-"运行",输入regedit,回车进入注册表编辑器
2.依次展开注册表项,浏览到以下注册表键:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer]
3.在屏幕右方找到名称"LoginMode",双击编辑双字节值
4.将原值从1改为2,点击"确定"
5.关闭注册表编辑器
6.重新启动SQL Server服务.
1.在服务器端使用企业管理器,并且选择"使用 Windows 身份验证"连接上 SQL Server
操作步骤:
在企业管理器中
--右键你的服务器实例(就是那个有绿色图标的)
--编辑SQL Server注册属性
--选择"使用windows身份验证"
--选择"使用SQL Server身份验证"
--登录名输入"sa",密码输入sa的密码
--确定
2.设置允许SQL Server身份登录
操作步骤:
在企业管理器中
--展开"SQL Server组",鼠标右键点击SQL Server服务器的名称
--选择"属性"
--再选择"安全性"选项卡
--在"身份验证"下,选择"SQL Server和 Windows ".
--确定,并重新启动SQL Server服务.
在以上解决方法中,如果在第 1 步中使用"使用 Windows 身份验证"连接 SQL Server 失败,
那就通过修改注册表来解决此问题:
1.点击"开始"-"运行",输入regedit,回车进入注册表编辑器
2.依次展开注册表项,浏览到以下注册表键:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer]
3.在屏幕右方找到名称"LoginMode",双击编辑双字节值
4.将原值从1改为2,点击"确定"
5.关闭注册表编辑器
6.重新启动SQL Server服务.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询