Forum Discussion
Connecting MS SQL with hostname\database
Hi PhilipTreacy
Thank you very much for your time. I have done the same.
I have done the same in cmd.
IP address ping is sucessfull and hostname ping is not successfull (Lost 100%).
May I know how to setup DNS resolution?
- PhilipTreacy1 year agoSuper User
Hi Karthik12
OK, firstly, is it necessary to use the hostname to connect? if the IP address works, why not just continue with that?
DNS resolution should work via your company DNS servers. I assume you are doing this from inside your business? If not, where did the hostname come from?
You can aso use an entry in your hosts file, but again, why not just stick with the IP address if it works?
To add an entry to your hosts file check this article for instructions
How to Add a Local DNS Lookup to Hosts File (helpdeskgeek.com)
Regards
Phil
- Karthik121 year agoPost Patron
Hi PhilipTreacy
The problem is am using IP address inside a business. Mine and remote host connected to a same business wifi and these IPs are dynamic and it used to change on daily basis.
I am facing connection issues everyday and I used to go to remote PC and note down the IP address then used to change data source option daily.
That's why I wanted to use hostname.
- PhilipTreacy1 year agoSuper User
OK then the business DNS server/system should be set up in such a way that you can use it to connect.
If the IP of the server is dynamic (why is this, it's crazy for a server to have a dynamic IP address?) then you can't use a static entry in your hosts file either.
Where did you get this hostname from? Whomever gave it to you should have set up a DNS system that allows you to use that hostname to connect to this server.
regards
Phil