>>>>I have SQL Express installed on my development laptop.
>>>>I want to simulate connecting to a remote SQL Server by using the IP address instead of localhost in the connection string. First question: Is this a good simulation of a remote connection?
>>>>When I try to use my IP instead of localhost in the connection string I can not connect. I did configure the SQL Server inctance to allow remote connections (using this article
http://support.microsoft.com/kb/914277), but that didn't help.
>>>>I am sure it is something in my connection string. What could I be missing?
>>>>
>>>>If anyone has any information to share it would be great.
>>>
>>>
>>>After starting the SQL Server Browser service I was able to connect using my machine's IP address in the connection string.
>>
>>I guess that's because SQL is using dynamic port addressing. I think that can be disabled but just running the browser service is simpler....
>
>Does that mean that the SQL Server is using a different port for each instance, and that the port might not be the same every time?
>I have read that the browser service is using UDP on port 1434. Is the SQL server still using port 1433.
>
>Is it correct to specify the instance name after the IP address (123.123.123.123/MyInstance)? Could I also specify the port after this (123.123.123.123/MyInstance,1433) and not need the browser service?
Maybe 123.123.123.123:1433/MyInstance - but I don't think it would work. I don't know a lot about this I'm afraid but it seems that MSSQL initially obtains a port from the OS and stores it in the registry. On subsequent start-ups it will use this port unless it is unavailable - in which case it polls for a new one. You can disable dynamic port assignment in the configuration manager - see the IPAddresses page in TCP/IP properties. But even then I don't know if it would work without changes to the client as well (adding an alias?). Probably simpler to leave the browser running.....