Connect to SQL Server 2008 with TCP/IP

前端 未结 8 2034
眼角桃花
眼角桃花 2020-12-05 16:16

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?

8条回答
  •  时光取名叫无心
    2020-12-05 16:25

    When you check the SQL Server Network Configuration (Start Menu > Microsoft SQL Server > Configuration Tools > SQL Server Configuration Manager > SQL Server Network Configuration), what do you see?

    Is the TCP/IP protocol really enabled on your server? It's off by default, and stays off in most cases (unless you specifically turn it on).

    Just using a IP-based server address doesn't mean you're connecting using the TCP/IP protocol.... check http://www.connectionstrings.com/sql-server-2008 for a sample connection string that will use TCP/IP:

    Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
    

    The key is the Network Library=DBMSSOCN; which tells your code to connect using TCP/IP.

提交回复
热议问题