SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Connect to sever by name rather than IP address


Connect to sever by name rather than IP address

Author
Message
PearlJammer1
PearlJammer1
SSChasing Mays
SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)

Group: General Forum Members
Points: 640 Visits: 1443
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 ?
SQL Surfer '66
SQL Surfer '66
SSC Eights!
SSC Eights! (930 reputation)SSC Eights! (930 reputation)SSC Eights! (930 reputation)SSC Eights! (930 reputation)SSC Eights! (930 reputation)SSC Eights! (930 reputation)SSC Eights! (930 reputation)SSC Eights! (930 reputation)

Group: General Forum Members
Points: 930 Visits: 328
What is the error message when it fails to connect?

Can you ping the server(s) by name?
PearlJammer1
PearlJammer1
SSChasing Mays
SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)

Group: General Forum Members
Points: 640 Visits: 1443
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
SQL Surfer '66
SQL Surfer '66
SSC Eights!
SSC Eights! (930 reputation)SSC Eights! (930 reputation)SSC Eights! (930 reputation)SSC Eights! (930 reputation)SSC Eights! (930 reputation)SSC Eights! (930 reputation)SSC Eights! (930 reputation)SSC Eights! (930 reputation)

Group: General Forum Members
Points: 930 Visits: 328
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.
Joie Andrew
Joie Andrew
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2313 Visits: 2032
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"
PearlJammer1
PearlJammer1
SSChasing Mays
SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)

Group: General Forum Members
Points: 640 Visits: 1443
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....
Joie Andrew
Joie Andrew
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2313 Visits: 2032
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"
PearlJammer1
PearlJammer1
SSChasing Mays
SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)SSChasing Mays (640 reputation)

Group: General Forum Members
Points: 640 Visits: 1443
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
Joie Andrew
Joie Andrew
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2313 Visits: 2032
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"
Ed Wagner
Ed Wagner
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16619 Visits: 10065
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search