使用TCP / IP连接到SQL Server 2008 [英] Connect to SQL Server 2008 with TCP/IP
本文介绍了使用TCP / IP连接到SQL Server 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试使用TCP / IP从SQL Server Management Studio连接时,我收到以下错误。我需要一步一步的描述来解决我的问题。这里有什么问题?
I get the following error when I try to connect with TCP/IP from SQL Server Management Studio. I need a step by step description to solve my problem. What's wrong here?
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, 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()
推荐答案
p>我通常忘记的是,即使您在SQLServerNetwork-> MSSQLServer的协议中将tcp标记为启用,您仍然需要去为服务器启用可能不同的IP地址。即使具有单个NIC的服务器也将具有多管道IP地址。
The thing I usually forget is that even if you mark tcp as enabled in SQLServerNetwork->Protocols for MSSQLServer, you still need to go and enable the potentially different IP addresses for your server. Even a server with a single NIC will have multipe IP addresses.
- 单击上面列出的MSSQLServer协议。
- TCP / IP。
- 现在双击TCP / IP以获取对话窗口。
- 如果要监听所有IP地址服务器在第一个协议选项卡上的
全部侦听框中选择是;否则 - 选择IP地址选项卡并通过将启用
设置为是启用所需的IP地址。
- Click on the Protocols for MSSQLServer as listed above.
- Then in the right hand pane enable TCP/IP.
- Now double click TCP/IP to get a dialog window.
- If you want to listen on all the IP addresses for the server Select Yes in the Listen All box on the first Protocol tab; otherwise
- Select the IP Addresses tab and enable the desired IP addresses by setting Enabled to Yes.
b $ b
这篇关于使用TCP / IP连接到SQL Server 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文