[ACCEPTED]-Connect to SQL Server 2008 with TCP/IP-database-connection

Accepted answer
Score: 18

The thing I usually forget is that even 5 if you mark tcp as enabled in SQLServerNetwork->Protocols 4 for MSSQLServer, you still need to go and 3 enable the potentially different IP addresses 2 for your server. Even a server with a single 1 NIC will have multipe IP addresses.

  1. Click on the Protocols for MSSQLServer as listed above.
  2. Then in the right hand pane enable TCP/IP.
  3. Now double click TCP/IP to get a dialog window.
  4. 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
  5. Select the IP Addresses tab and enable the desired IP addresses by setting Enabled to Yes.

enter image description here

Score: 13

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

alt text

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

Just 5 using a IP-based server address doesn't 4 mean you're connecting using the TCP/IP 3 protocol.... check http://www.connectionstrings.com/sql-server-2008 for a sample connection 2 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 1 tells your code to connect using TCP/IP.

Score: 8

Also worth checking that the SQL Server 2 Browser Service is running as TCP/IP connections 1 will use this service

Score: 4

Have a look at www.connectionstrings.com. Error 4 message looks like you're using named pipes 3 and not tcp/ip. Don't forget you must enable 2 TCP/IP on server machines for SQL Server 1 explicitly.

Score: 3

There is a good walkthrough for configuring 1 this, including

  • Enabling TCP/IP protocol for the database server
  • Enabling remote connections for the database server
  • Allowing the TCP traffic through the firewall

at http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx.

Score: 0

Follow this:

Start -> Programs -> Microsoft 4 SQL Server 2008 -> Configuration Tools -> SQL 3 Server Configuration Manager

SQL Server network 2 Configuration -> Protocols for [SQLInstanceName]

Right 1 click TCP/IP -> Enable

Score: 0

If TCP/IP is already enabled then it sounds 4 like your firewall is blocking the connection. Open 3 the relevant ports and it should work.

You 2 should check the firewall on both ends of 1 the connection.

Score: 0

To connect to MSSQL(SQL Server) with "TCP/IP", you need to enable 6 "TCP/IP" with SQL Server Configuration Manager(SSCM). This is How to find SQL Server Configuration Manager(SSCM) in your Windows Machine.

So, on SSCM, enable "TCP/IP" from "SQL Server Network Configuration/Protocols for SQLEXPRESS" as 5 shown below. *"TCP/IP" for MSSQL is disabled by default:

enter image description here

After 4 clicking on "Enable" as shown above, you will get 3 the message below:

enter image description here

So, as the message above 2 says, restart SQL Server(SQLEXPRESS) from "SQL Server Services" as shown below:

enter image description here

Finally, you 1 can connect to MSSQL with "TCP/IP".

More Related questions