当前位置: 代码迷 >> Sql Server >> Sql server 2005 express使用windows验证,该怎么解决
  详细解决方案

Sql server 2005 express使用windows验证,该怎么解决

热度:78   发布时间:2016-04-27 18:38:43.0
Sql server 2005 express使用windows验证
环境: windows server 2003 + sql server2005 express.
问题: 
  我新建了一个组webDBUsers, 新建了一个普通帐户ronio,然后把ronio添加到该组中。
然后再express中,
新建登录: create login domain\webDBUsers from windows with default_database=testDB
用户映射: create user webUser for login domain\webDBUsers

但是这样建了以后,我一ronio帐户登录windows server 2003,然后打开express,以windows验证方式登录,却出现了如下错误:
  login failed for user 'STUDYPON-QHTGGX\Ronio'

详细错误信息如下:
  ==================================

无法连接到 domain\SQLEXPRESS。

===================================

Login failed for user 'domain\Ronio'. (.Net SqlClient Data Provider)

------------------------------
有关帮助信息,请单击: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476

------------------------------
服务器名称: domain\SQLEXPRESS
错误号: 18456
严重性: 14
状态: 1
行号: 65536


------------------------------
程序位置:

  at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
  at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
  at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
  at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
  at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
  at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
  at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
  at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
  at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
  at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
  at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
  at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
  at System.Data.SqlClient.SqlConnection.Open()
  at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo ci, IServerType server)
  at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()



我用了很多方法测试都不行,baidu google上搜了不少,好像很少用普通帐户登录express的文章,
希望哪位大侠能指点一二,万分感谢!


------解决方案--------------------
2005还没试过,关注,学习,接分.
------解决方案--------------------
Window认证分为两种。一种是本地模式,一种是域模式,你安装的时候先错了。建议你重新装一下SQL2005这样你可以知道在哪一步进行选择,以后就不会错了。简单方法:同时,你以域身份登录到本机,然后在2005的服务器配置给改一下就行了,具体的语句,你到网上搜吧,我要下班了,不好意思啊,
------解决方案--------------------
那你把登录模式设置成混合登录模式,然后使用指定的用户名和密码来登录不行吗?
------解决方案--------------------
  相关解决方案