Mouse
Mouse

Reputation: 31

Can't connect to SQL Server on Server 2008 R2 VM; port 1433 is open

I have a virtual machine running Windows Server 2008 R2 and SQL Server 2008 R2. The host is running Windows 7. I can connect to the SQL server from the VM using SQL Server authentication, but I can't connect from the host using the same method and credentials. I can ping the VM from the host, but I can't telnet to port 1433. On the VM, port 1433 is open through the firewall, TCP/IP is enabled on the SQL instance, and all IP addresses in TCP/IP properties are enabled. I have verified that SQL Server is listening on port 1433. I've been trying to figure this out for two days and I'm about at wit's end. Any ideas?

Upvotes: 1

Views: 1818

Answers (2)

Mouse
Mouse

Reputation: 31

The problem turned out to be the IP address I was trying to connect on. The VM would respond to pings, but nothing else was listening there, I take it. Changing the IP address for the VM in my hosts file to the first one listed under the VM's ipconfig fixed it. (I'd taken the IP address I was trying to use from SQL Server Configuration Manager, which got it from ???.) Our network guy figured it out for me, so I can't give more details, sorry.

Upvotes: 1

Mohamed Gharib
Mohamed Gharib

Reputation: 2587

Try this:
Goto SQL Server Configuration Manager from start menu then from the left pane choose SQL Server Network Configuration then choose your instance name..
Then from the right pane choose TCP/IP .. make sure it's enabled then :
In its properties > IP Addresses clear any field named TCP Dynamic Ports and for any field named TCP Port set its value to 1433

Upvotes: 0

Related Questions