Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems connecting
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01424393
Message ID:
01424530
Views:
29
Thanks for your reply Sergey. Darn firewalls :)

>Questions:
>
>>1. Why doesn't the 2nd connection string work?

>
>The fist connection string points to the Named SQL Server instance Alliance on the server 123.123.123.123
>The second connection string points to the default SQL Server port (1433) port on the server 123.123.123.123. A named instance by default does not listen on that port but uses dynamic ports. As you found out, it can be changed.
>
>>2. Which connection string is better?
>
>I would say, the first one because it's more generic and doesn't require the SQL Server ports reconfiguration but it all depends on your requirements.
>
>>3. Why would the 1st connection string not work from a web hosting company?
>
>My guess would be that a firewall is blocking dynamic ports used by the named instance.
>
>
>>Here is what is bugging me tonight.
>>
>>I setup a SQL server on a computer.
>>I am able to connect remotely using the following connection string:
>
>>Data Source=123.123.123.123\Alliance;Initial Catalog=QuantumCoin;Integrated Security=False;User ID=einar;Password=GoPack;Connect Timeout=15
>
>>
>>but the following connection string does not work
>
>>Data Source=123.123.123.123,1433;Initial Catalog=QuantumCoin;Integrated Security=False;User ID=einar;Password=GoPack;Connect Timeout=15
>
>>
>>The 2nd connection string gives the following error message
>
>>System.Data.SqlClient.SqlException: 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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)
>
>>
>>The error message doesn't make any sense to me since I can connect remotely using the 1st connection string.
>>
>>I have setup SQL server on one of my PCs and I can connect to that database using both versions of the connection string.
>>The reason I have to get the 2nd connection string to work is because the web hosting company that I am trying to connect from the 1st connection string does not work for some reason so I have to use the format in the 2nd connection string.
>>
>>
>>
>>Very odd stuff.
>>
>>UPDATE:
>>I got the 2nd connection string working now by following the instructions in this link
>>http://msdn.microsoft.com/en-us/library/ms177440.aspx
>>But any information on this is still welcome
>
Semper ubi sub ubi.
Previous
Reply
Map
View

Click here to load this message in the networking platform