Outline ·
[ Standard ] ·
Linear+
Server Identification, Server name or IP Address??
|
TSone.good.guy
|
Mar 7 2006, 03:29 PM, updated 20y ago
|
|
I am connecting to a MS SQL database on a server using ODBC. I have created a data source referring to the database on that server using IP Address. All in all, it is working fine till one day I restarted the server. From that points onwards, client ODBC connection using the IP Address is not valid anymore. Even trying Run -> \\ip.address.here yielded error message: "\\ip.address.here The network path was not found.". However, if I reset ODBC connection to point to the server using the server name, it is successful. Similarly, typing the server name in Run prompt opened shared folders on that server. I would appreciate is anyone can enlighten me why connection to a server is not stable; need to switch between IP and server names at time. Thanks a lot!
|
|
|
|
|
|
fly
|
Mar 7 2006, 04:15 PM
|
¯\(°_o)/¯
|
I'm guessing that you're on a DHCP LAN. This means that everytime you reboot, there's a possibility that a new IP address would be assigned to your server (depends on the length of the DHCP lease). This is why the older IP address is no longer valid.
It's a better practice to use hostnames instead of IP addresses when making connections to servers as it's more likely for IP address to change or migrate rather than hostnames.
|
|
|
|
|
|
TSone.good.guy
|
Mar 7 2006, 04:48 PM
|
|
it's a static ip network over here. basically IP is still the same for the server whenever rebooted. just that sometimes u can only connect using the hostname, sometimes using the IP..
|
|
|
|
|
|
SincerePrayer
|
Mar 8 2006, 09:16 AM
|
love to pray
|
one.good.guy, When you are unable connect via hostname, can you ping that hostname? If you cannot, that mean the PC is unable resolve the name to IP. Do you have DNS server in place? Perhaps add an entry into the host file will solve your issue. Cheers
|
|
|
|
|
|
TSone.good.guy
|
Mar 9 2006, 02:12 PM
|
|
QUOTE(SincerePrayer @ Mar 8 2006, 09:16 AM) one.good.guy, When you are unable connect via hostname, can you ping that hostname? If you cannot, that mean the PC is unable resolve the name to IP. Do you have DNS server in place? Perhaps add an entry into the host file will solve your issue. Cheers  Sorry for da late reply. Was on leave- it's been a while. Nah, cant ping the hostname when IP is ok. and vice versa. TQ dude. i will try to do as per ur advice. Let me try it out first..
|
|
|
|
|
|
TSone.good.guy
|
Mar 10 2006, 11:29 AM
|
|
TQ for the help, fly and sincere! i'm keeping this thread close till i have tested ur ideas out.
c ya!
|
|
|
|
|