Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Connect to sever by name rather than IP address Expand / Collapse
Author
Message
Posted Wednesday, July 31, 2013 3:05 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 5:12 AM
Points: 258, Visits: 1,020
Hi
When i first open SSMS the 'Connect to Server' logon box appears. In it the server name drop down box is a whole bunch of different ip address of all the servers we use in our production environment. If i click 'cancel' the 'Connect to server' box goees away and i am left with ssms open, and, at the bottom left i can see my 'Registered servers tab' and my 'Object Explorer' tab.
In the Registred servers tab is a list of servers by name which is far more easier when i need to connect to the required server.
The problem is when i want to change connection by clicking the 'Connect Object explorer' it opens up the 'Connect to Server' box again with all the IP address.
I have tried typing in the names of the servers in replacement of the ip address but it fails to connect.
How do i get this list of ip address to display the server names so its easier to switch when i want to connect ?
This is probably really basic but its one of those things you probably only set up once and then its done ! Any tips ?
Post #1479356
Posted Wednesday, July 31, 2013 3:52 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, November 24, 2014 7:17 AM
Points: 487, Visits: 259
What is the error message when it fails to connect?

Can you ping the server(s) by name?
Post #1479368
Posted Wednesday, July 31, 2013 4:23 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 5:12 AM
Points: 258, Visits: 1,020
I can actually connect via the ip address so network connectivity is fine. I just wish to connect via the name though.

I just type in the server name in the server name box - do i need a fully qualified domain name perhaps (this has just occured to me !) ?

The error i get is :

annot connect to SERVERXXXXX.

------------------------------
ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=53&LinkId=20476



Post #1479380
Posted Wednesday, July 31, 2013 5:08 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, November 24, 2014 7:17 AM
Points: 487, Visits: 259
I asked if you could ping the server(s) by name to verify that the DNS was working.

By the additional information I see that it tries to connect via Named Pipes and not TCP/IP. If you specify a fully qualified domain name it should work.
Post #1479395
Posted Wednesday, July 31, 2013 5:12 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Monday, November 24, 2014 3:46 AM
Points: 709, Visits: 1,442
There could be a lot of things going on. If you double-click on one of your registered servers that are listed by name does it connect successfully? If so I would take a look at the properties of the registered server. You could have something like SQL listening on a specific IP that is not registered to a host name in DNS so when the server is added to registered servers it just lists the server name in the label, but it is still using the IP address to do the actual connection.

Joie Andrew
"Since 1982"
Post #1479399
Posted Wednesday, July 31, 2013 5:16 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 5:12 AM
Points: 258, Visits: 1,020
ahh Sorry i misunderstood. Presumed you meant ping by IP.

No i cannot ping by the server name but i can ping by ip.

I will try a FQDN and see if that works....
Post #1479401
Posted Wednesday, July 31, 2013 5:22 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Monday, November 24, 2014 3:46 AM
Points: 709, Visits: 1,442
No i cannot ping by the server name but i can ping by ip


Are these servers in a production environment? It sounds like their hostnames are not registered in DNS. If you cannot ping them by name that sounds like a name resolution issue.

Have you ever been able to ping them or connect in SSMS to them by name?


Joie Andrew
"Since 1982"
Post #1479404
Posted Wednesday, July 31, 2013 5:34 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 5:12 AM
Points: 258, Visits: 1,020
These servers are in a production environment. I am not sure if these have been able to connect via name previoulsy as i am new here.
I have just managed to ping by typing
Ping Servername.domain

However when i use the same format in the 'connect to server' box in ssms i get the same error as i posted a while back
Post #1479413
Posted Wednesday, July 31, 2013 5:41 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Monday, November 24, 2014 3:46 AM
Points: 709, Visits: 1,442
So you can successfully ping by server name, or you can't? If you can ping by server name now try connecting by name again in ssms.

Joie Andrew
"Since 1982"
Post #1479416
Posted Wednesday, July 31, 2013 5:52 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: 2 days ago @ 11:35 AM
Points: 4,482, Visits: 3,938
If you can ping the server by name, then DNS is resolving the name, but SQL Server might be configured to allow connections only on a specific port. If so, you'll need to include it when connecting via SSMS. If you don't have this, the DBA should be able to provide you with the information.


Tally Tables - Performance Personified
String Splitting with True Performance
Best practices on how to ask questions
Post #1479418
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse