Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

normally i connect to my sql server instance from my local computer, and then the server name to connect to is the name of my laptop. So i can connect to server instance 'MichelLaptop'

But now i'm trying to connect to my server from outside my network, and the first thing i wonder is: what is the name of the instance?

i've made a redirect to my local machine in the DNS of my domain, so i said (this is not the real data)

testsql.mydomain.com goes to 190.191.192.193

and when i ping testsql.mydomain.com, i get a response from 190.191.192.193

But what then is the server name?

EDIT: Should this also work from my local machine? (connect to the test.mydomain.com which routes back to my local machine?) As you probably figured out this doesn't work yet, but there are a lot of reasons i presume that could lead to this. Do i have to set anything specific to allow my sql server instance to allow remote connections?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

What you've actually done is assign your server a hostname in DNS. This is what machines outside of your network will know your server as. Your hostname, then, is testsql and that is what you should use in connection strings and whatnot. If you have named instances you should use the format server\instancename, so in your case that would be testsql\myinstance.

share|improve this answer
    
Thanks very much. Need some more testing i think to get it working. Should this also work from my local machine? (connect to the test.mydomain.com which routes back to my local machine?) As you probably figured out this doesn't work yet, but there are a lot of reasons i presume that could lead to this. Do i have to set anything specific to allow my sql server instance to allow remote connections? –  Michel Mar 17 '10 at 18:29
1  
@Michel - Yes, it should. The biggest thing you might run into is if you have an internal dns domain with the same name as your Internet domain, which I kinda doubt that you do from your problem description. –  squillman Mar 18 '10 at 13:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.