3

I'm trying to connect to a SqlServer instance - located in my host machine - from my VM, using Sql Server Management Studio.

From my host I can connect to both SQL instances using SSMS, but when I try to connect to the host instance from the VM, SMSS gives this error message (mine is in PT-BR):

enter image description here

My environment is like this: the blue dotted block represents my host (PC_MASTER) and the orange dotted block represents my VM (MYVM):

enter image description here

Here are the main components in each machine:

PC-MASTER (Host): Windows 8 PRO-English w/ SQL Server 2012 Express. SQL instance name is "PC-MASTER\SQLEXPRESS".

MyVM (VM): Windows Server 2012 BR-Portuguese w/ SQL Server 2012 Standard. SQL instance name is "MYVM".

Firewall: The host has an inbound rule opening the 1433/1434 TCP ports for all programs/services;

SQL Protocols: In both servers all 3 main protocols are on, in the following order: Shared Memory, TCP/IP and Named Pipes;

Remote Access: Both SQL servers are configured to allow remote connections;

SQL Configuration: The host SQL is configured to allow only static access through the port 1433, as Somantra pointed out.

From my VM(MYVM):

  • I can only connect to the local SQL instance.
  • I can ping the host successfully using either its IP or its name;
  • I cannot connect to the host using telnet: I tried the ports 21, 23, 80, 1433 and 1434.

Tks!

  • Did you configure a listening port for PC-MASTER\SQLEXPRESS in SQL Server Configuration Manager? screencast.com/t/EX2COv1mF2iJ – Somantra May 6 '14 at 14:11
  • Hi Somantra, tks for the tip! Unfortunatelly it does not solved the problem, the error message is still appearing in the VM. – tcbrazil May 6 '14 at 15:29
  • Hi Tom Tom/Tom O'Connor: Can you give me a more direct guidance about how rephrase this question? I believe it's in the right forum, since I saw a lot of similar questions here, and I listed all info/configs I know. If I knew ALL things beforehand, I probably would have solved it already... I understand the main goal of this forums is to help people with their problems - no matter how silly it must appears to others - and holding a question with little/none explanations on how to rephrase it correctly goes against this goal, right? Thanks in advance for your help. – tcbrazil May 8 '14 at 12:00
  • Named instances use a different set of ports, not just :1433. You need at least :1434 and the port of your instance. See the answer on: serverfault.com/questions/130549/ms-sql-server-firewall-ports – Mark Henderson May 19 '14 at 0:37
5

So I spent a few minutes looking at all the duplicates of this problem, and there are a few, but to be honest they all kind of sucked in terms of their answers, so here we go:

Port 1433 is only good for default instances of SQL Server. If you are going to connect to a named instance, you have two options:

  1. Use SERVER\INSTANCE name and open ports 1434 (for SQL Browser) and the port of your SQL Server Instance (more on that later)
  2. Use SERVER:port where port is the port of your SQL Server Instance

To determine which port your SQL Server instance is running on in the SQL Server Configuration Manager, under Network Configuration > TCP/IP > IP Addresses:

enter image description here

So for #1 I need to open 1434 and 64670 and for #2 I just need to open 64670, but use a different SQL connection string.

  • Tks a lot Mark, I'll test it today ASAP! – tcbrazil May 19 '14 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.