SQL2012 SSMS fail to connect named instance

Hi, Currently we would like to setup replication between 2 sql instances (binded to corresponding IP, listening on port 1433) on different servers (DUAT01, DUAT101). However, we found the SSMS cannot connect remote server A from server B using named instance.

The sql instances can be connected by using either IP or FQDN, however, that cannot fulfill the requirement on setting up replication as it require the instance to connect as "DUAT101\SQL2K8R2" instead of "x.x.x.x" or "SQLUATCSS2K8R2.domain.com".

We tried to change "Protocol"->"Listen All" from "No" to "Yes", then SSMS can connect the named instance successful in this format "DUAT101\SQL2K8R2", but the application using "SQLUATCSS2K8R2.domain.com" to connect sql instance was fail.

Pls advise how to make it possible to connect sql instance successful in both way. thanks.

March 18th, 2015 6:47am

Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 6:48am

See if this thread helps you

http://dba.stackexchange.com/questions/62165/i-cant-connect-to-my-servers-sql-database-via-an-ip-address

March 18th, 2015 6:58am

can connect the named instance successful in this format "DUAT101\SQL2K8R2", but the application using "SQLUATCSS2K8R2.domain.com" to connect sql instance was fail.

Hello,

To connect to a named instance you have to use either the instance name or the instance IP port, like
DUAT101, 1433
The only other Option is to create a SQL Server alias using CliConfg.exe (Client configuration) tool.

Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 6:59am

See if this thread helps you

http://dba.stackexchange.com/questions/62165/i-cant-connect-to-my-servers-sql-database-via-an-ip-a

March 18th, 2015 7:02am

can connect the named instance successful in this format "DUAT101\SQL2K8R2", but the application using "SQLUATCSS2K8R2.domain.com" to connect sql instance was fail.

Hello,

To connect to a named instance you have to use either the instance name or the instance IP port, like
DUAT101, 1433
The only other Option is to create a SQL Server alias using CliConfg.exe (Client configuration)

Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 7:06am

It always return the default instance with "DUAT101, 1433".


Of course you have to use the correct IP port of the other instances, not those of the default instance.
March 18th, 2015 10:31am

It always return the default instance with "DUAT101, 1433".


Of course you have to use the correct IP port of the other instances, not those of the default
Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 12:13pm

In SSMS are all SQL Server added as "Registered Server"? If so then all should be selectable in "Replication Wizard".
March 18th, 2015 12:25pm

In SSMS are all SQL Server added as "Registered Server"? If so then all should be selectable in "Replication Wiz
Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 2:57pm

Hi hklbj23,

Since SQL Server replication requires the actual server name to make a connection to the subscriber server, and IP address is not supported. So please make sure to use the right server name to connect to the subscriber server when creating the subscription.

To get the right server name of your subscriber server, please login to your subscriber server using IP port through SQL Server Management Studio according to Olafs post, and execute the following statement: select @@servername

Regards,
Michelle Li

March 19th, 2015 8:58am

Hi hklbj23,

Since SQL Server replication requires the actual server name to make a connection to the subscriber server, and IP address is not supported. So please make sure to use the right server name to connect to the subscriber server when creating the subscription.

To get the right server name of your subscriber server, please login to your subscriber server using IP port through SQL Server Management Studio according to Olafs post, and execute the following statement: select @@servername

Regards,
Michelle Li

Free Windows Admin Tool Kit Click here and download it now
March 19th, 2015 12:56pm

Hi hklbj23,

Since SQL Server replication requires the actual server name to make a connection to the subscriber server, and IP address is not supported. So please make sure to use the right server name to connect to the subscriber server when creating the subscription.

To get the right server name of your subscriber server, please login to your subscriber server using IP port through SQL Server Management Studio according to Olafs post, and execute the following statement: select @@servername

Regards,
Michelle Li

Michelle, Olaf

I tried the method you mentioned above, however, I still can't make it even I created the registered server. Detail can refer to upload screen shot below.

March 19th, 2015 10:06pm

Free Windows Admin Tool Kit Click here and download it now
March 19th, 2015 10:06pm

What does select @@servername returns?
March 19th, 2015 10:19pm

DUAT01\SQL2K12

Free Windows Admin Tool Kit Click here and download it now
March 19th, 2015 11:56pm

Can you tell me if you type ping -a ipaddress if you see server name getting resolved?

If firewall is enabled on the server, you need to put sqlbrowser.exe and/or UDP port 1434 into exception.

March 20th, 2015 12:09am

Yes, server name can resolved and no firewall between DUAT01 & DUAT101.

  • Edited by hklbj23 3 hours 10 minutes ago
Free Windows Admin Tool Kit Click here and download it now
March 20th, 2015 12:32am

Ok so we are resolving different name then hostname...

Type hostname what it returns on cmd?

What happen when you ping DUAT01?

Did you try adding the SQL Server machine into /etc/host file. To add the entry in the /host file type %SystemRoot%\system32\drivers\etc\ in the run window and open the host file using Notepad.  Make sure you have a copy of host file first and then edit and add below line:

10.161.0.46 SQLUAT2K12_CI_As.glshk.com SQLUAT2K12_CI_As DUAT01

You have to do on both machines...







March 20th, 2015 12:44am

Since DUAT01 have 5 SQL instances (2008 x 2, 2008R2 x 2, 2012) with 5 IPs they are all listening on port 1433. If I change the host file in DUAT101 (as client machine) then I can only connect to only 1 instances at one time.

5 instances name as

MSSQLSERVER

SQL2K12

SQL2K8_CI_AS

SQL2K8R2

SQL2K8R2_BIN

Free Windows Admin Tool Kit Click here and download it now
March 20th, 2015 2:12am

What does select @@servername returns?
  • Edited by dave_gona Friday, March 20, 2015 2:18 AM
March 20th, 2015 2:17am

You are saying you have 5 different IP address for 5 instances? 

Type hostname what it returns on cmd?

What happen when you ping DUAT01?

 what happens when you connect ssms using SQLUAT2K12_CI_As.glshk.com\SQL2K12
Free Windows Admin Tool Kit Click here and download it now
March 20th, 2015 2:21am

If you have different ip you can still add ip in host entry 

ipaddress DUAT01

Please refer

http://www.rickygao.com/how-to-use-the-same-port-for-multi-instance-in-a-single-sql-server/

March 20th, 2015 2:28am

If you have different ip you can still add ip in host entry 

ipaddress DUAT01

Please refer

http://www.rickygao.com/how-to-use-the-same-port-for-multi-instance-in-a-single-sql-server/

Dave,

our setup in DUAT01 is already as the link mentioned but it still prompt same error.

Client connect failure

Free Windows Admin Tool Kit Click here and download it now
March 20th, 2015 2:50am

March 20th, 2015 2:51am

Free Windows Admin Tool Kit Click here and download it now
March 20th, 2015 2:52am

March 20th, 2015 2:54am

Could you paste you /etc/hosts file?

Free Windows Admin Tool Kit Click here and download it now
March 20th, 2015 3:20am

Could you paste you /etc/hosts file?


March 20th, 2015 3:29am

Can you tell me if you type ping -a ipaddress if you see server name getting resolved?

If firewall is enabled on the server, you need to put sqlbrowser.exe and/or UDP port 1434 into exception.

  • Edited by dave_gona Friday, March 20, 2015 4:17 AM
Free Windows Admin Tool Kit Click here and download it now
March 20th, 2015 4:06am

Yes, server name can resolved and no firewall between DUAT01 & DUAT101.

  • Edited by hklbj23 Friday, March 20, 2015 4:30 AM
March 20th, 2015 4:30am

Ok so we are resolving different name then hostname...

Type hostname what it returns on cmd?

What happen when you ping DUAT01?

Did you try adding the SQL Server machine into /etc/host file. To add the entry in the /host file type %SystemRoot%\system32\drivers\etc\ in the run window and open the host file using Notepad.  Make sure you have a copy of host file first and then edit and add below line:

10.161.0.46 SQLUAT2K12_CI_As.glshk.com SQLUAT2K12_CI_As DUAT01

You have to do on both machines...







  • Edited by dave_gona Friday, March 20, 2015 5:04 AM
Free Windows Admin Tool Kit Click here and download it now
March 20th, 2015 4:41am

You are saying you have 5 different IP address for 5 instances? 

Type hostname what it returns on cmd?

What happen when you ping DUAT01?

 what happens when you connect ssms using SQLUAT2K12_CI_As.glshk.com\SQL2K12
  • Edited by dave_gona Friday, March 20, 2015 6:21 AM
March 20th, 2015 6:18am

If you have different ip you can still add ip in host entry 

ipaddress DUAT01

Please refer

http://www.rickygao.com/how-to-use-the-same-port-for-multi-instance-in-a-single-sql-server/

  • Edited by dave_gona Friday, March 20, 2015 6:29 AM
Free Windows Admin Tool Kit Click here and download it now
March 20th, 2015 6:25am

Could you please add in host file and try

10.161.0.46 DUAT01\SQL2K12

March 20th, 2015 9:56am

Could you please add in host file and try

10.161.0.46 DUAT01\SQL2K12

It doesn't work either.

Free Windows Admin Tool Kit Click here and download it now
March 22nd, 2015 11:54pm

Please type start ---> cmd --> hostname and also ping 10.161.0.46? Also i think you said if you use ip address you are able to connect to instance right?

screeshot of ssms with ip (10.161.0.46)

March 23rd, 2015 3:15am

Please type start ---> cmd --> hostname and also ping 10.161.0.46? Also i think you said if you use ip address you are able to connect to instance right?

screeshot of ssms with ip (10.161.0.46)


Free Windows Admin Tool Kit Click here and download it now
March 23rd, 2015 3:20am

ping DUAT01

ping 10.161.0.46

Also when you connect(10.161.0.46) ssms with ip address it connects to which SQL instance?
March 23rd, 2015 3:24am

ping DUAT01

ping 10.161.0.46

Also when you connect(10.161.0.46) ssms with ip address it connects to which SQL instance?

it is DUAT01\SQL2K12 instance with 10.161.0.46

Free Windows Admin Tool Kit Click here and download it now
March 23rd, 2015 3:27am

ping -a 10.161.0.46

Also when you connect(10.161.0.46) ssms with ip address it connects to which SQL instance?
March 23rd, 2015 3:30am

ping -a 10.161.0.46

Also when you connect(10.161.0.46) ssms with ip address it connects to which SQL instance?

it is DUAT01\SQL2K12 instance with 10.161.0.46

Free Windows Admin Tool Kit Click here and download it now
March 23rd, 2015 3:33am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics