sql-server – 使用TCP / IP连接到SQL Server 2008

前端之家收集整理的这篇文章主要介绍了sql-server – 使用TCP / IP连接到SQL Server 2008前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当我尝试从sql Server Management Studio连接TCP / IP时,我收到以下错误.我需要一步一步的描述来解决我的问题.这里有什么问题?
Cannot connect to 
===================================

A network related or instance specific error when a connection to sql Server...
(provider: Named pipe-provider,error: 40 -  sql Server)
(.Net sqlClient Data Provider)

------------------------------
For help,click: http://go.microsoft.com/fwlink?ProdName=Microsoft+sql+Server&EvtSrc=MSsqlServer&EvtID=53&LinkId=20476

------------------------------
Error Number: 53
Severity: 20
State: 0

------------------------------
Program Location:

   at System.Data.sqlClient.sqlInternalConnection.OnError(sqlException exception,Boolean breakConnection)
   at System.Data.sqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.sqlClient.TdsParser.Connect(ServerInfo serverInfo,sqlInternalConnectionTds connHandler,Boolean ignoreSniOpenTimeout,Int64 timerExpire,Boolean encrypt,Boolean trustServerCert,Boolean integratedSecurity,sqlConnection owningObject)
   at System.Data.sqlClient.sqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo,String newPassword,sqlConnection owningObject)
   at System.Data.sqlClient.sqlInternalConnectionTds.LoginNoFailover(String host,Boolean redirectedUserInstance,sqlConnection owningObject,sqlConnectionString connectionOptions,Int64 timerStart)
   at System.Data.sqlClient.sqlInternalConnectionTds.OpenLoginEnlist(sqlConnection owningObject,Boolean redirectedUserInstance)
   at System.Data.sqlClient.sqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity,Object providerInfo,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()

解决方法

我通常忘记的是,即使在MSsqlServer的sqlServerNetwork->协议中标记为tcp,您仍然需要为服务器启用潜在的不同IP地址.即使具有单个NIC的服务器也将具有多个IP地址.

>单击上面列出的MSsqlServer协议.>然后在右侧窗格中启用TCP / IP.>现在双击TCP / IP获取对话窗口.>如果要监听服务器的所有IP地址,请选择“是”在第一个协议选项卡上侦听全部框;除此以外>选择IP地址选项卡,并通过设置Enabled启用所需的IP地址到是的.

原文链接:https://www.f2er.com/mssql/75948.html

猜你在找的MsSQL相关文章