Connection errors from Terminal Server

  • Hi Everyone,

    Hope someone can help. We are trying to get a application I wrote in VB to connect to a SQL Server 2008 database. The Terminal server in running on Windows Server 2003. The application was installed using the Add Program method through the control panel.

    On the DB side we have SQL 2008. Name Pipes and TCP/IP are enabled. "Allow Remote connection" is enabled.

    When the app is run the the terminal server I get the following error:

    A network-related or instance specific error occurred while establishing a connection to the server. (Provider: Named Pipes provider; Error 40 - could not open connection to SQL Server)

    Is there something in Terminal server that would disable outbound connections to a DB? I can run the app from my desktop and it connects fine. Try to connect to a different SQL Server from the terminal server I get the same error message. The second DB works from another terminal server just fine. Why can't I connect through this terminal server. Thanks for any help.

    Michael

  • Have you checked that you can connect to the sql instance over the network. Can you ping the name or IP that you are using in your connection string of your application?

  • Thanks for the reply. I just pinged the DB from the Terminal server and appears to be working. It said it sent 4 packets and received 4 back with none lost.

    I can connect to the DB over the network from my desktop. It seems as though access to any DB is blocked. I've already removed any firewalls on the servers to make sure that was not the issue. We have other terminal servers which we don't have this connection issue. Just weird. Thanks for any advice.

    Michael

  • I have also seen where userid and password in my connection string of my app are not correct and I see that error. You might also check on your DB server under SQL Configuration manager that the settings for TCP/IP are all enabled and on. There are actually two places you have to enable. If you change any of these you need to reset your sql service.

  • Hi,

    I'm not using a userId and password. We use Windows auth to allow access to the DB. My app also uses it own security. I have turned on TCP/IP in the SQL Server configuration Manager. Made sure its enabled "Protocal for MSSQLSERVER" and "Client Protocols" and the service has been reset many times since this issue, even after each change I've made to try and fix this issue. Thanks for any info.

    Michael

  • I'm a little perplexed right now. I still have a problem with connecting with the original program, but I installed another one of my programs (VB.NET) on the Terminal server and was able to connect to the BP-SQL server. But I get the same error I originally reported when the original app is run.

    I'm Running

    Visual Studio 2008 (VB.NET)

    Target Framework is set to 2.0 (Have .NET 3.5 installed on server)

    If I run either app on my desktop I have NO problems at all. It only seems to be an issue with the app (I think). Beside the connect string, is there anything else that could cause connection errors? My connect string is as follows:

    Data Source=BP-SQL;Initial Catalog=Alternatives_BP;Integrated Security=True

    THanks for any help.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply