Connection Errors

  • Hi All,

    I'm having some weird issues connecting to a SQL Server 2008 server from any terminal server machines. Here is the setup we currently have.

    SQLSRV1 - Windows Server 2003 - SQL Server 2008

    SQLSRV2 - Same as above

    Terminal1 - Windows Server 2003

    Terminal2 - Windows Server 2000

    With a connect string in my VB.NET 2008 app as follows:

    Integrated Security=True;Data Source=SQLSRV1;Initial Catalog=Tracking;

    When trying to open a connection from my app from Terminal1 or Terminal2, I get the following error:

    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: Named Pipes provider, Error:40 - Could not open a connection to the SQL Server.)

    I get the same error if I install and run the app from Terminal2 also. As a test I also installed the app on SQLSRV1 and SQLSRV2 to see if it would work correctly. Whats I find weird is that it appears to connect (No connection errors) because it claims to not find any of the stored procs. I know that all the tables and stored procs are in the DB. Please note that the app works fine on 2 of my development machines, but I just installed it on a PC on the network and I get the above error (Error: 40).

    Properties I've made are set for SQLSRV1:

    Allow Remote Connections is enabled

    TCP/IP in enabled and active (The server has two network ports but only one is currently plugged in).

    Name Pipes is enabled and active.

    I also tried enabling Shared Memory, no change in errors(I tried this based on some newsgroup posts).

    I can connect to SQLSRV1 using the Management console, SQLCMD or osql from either the SQLSRV1 or SQLSRV2. I can also use SQLCMD or osql from my dev machine without issue.

    I can ping the server without issue.

    If I set the connection string like so:

    Integrated Security=True;Data Source=np:SQLSRV1;Initial Catalog=Tracking;

    I get the same error as above, but if I change "np" to "tcp" i get the following error:

    (Provider: TCP Provider, error: 0, No connection could be made because the target machine actively refused it.)

    If I run sqlcmd /L from another DB server the DB server in question is listed.

    We have NO Firewall active on either the SQLSRV1 or TERMINAL1.

    SQL Browser is enabled.

    Question: Do I need to use an alias for this to work with TCP-IP? (I read in a blog something about adding an alies). If I don't have to I would prefer to not use it right now.

    I hope someone can help. I've been trying to locate the issue for over a week. THanks for any help that you may be able to provide.

    Michael

  • I assume both of these SQL server instances are not named instances (they are using the default: name of the machine). Have the servers they are running on been renamed?

    You stated that both servers connectivity is enabled (TCP/IP & named pipes). shared memory is useful only on the local machine (it is what SSMC will use if enabled). You have to bounce the service for any changes to take effect, hopefully you already have done this.

    You have already assured me there is no routing issue so it has to be the name of the server is wrong or the server is not enabled for remote connections. Have you looked in the SQL Server log for any errors?

    select * from sys.sysservers see what it thinks is going on.

    The probability of survival is inversely proportional to the angle of arrival.

  • Thanks for the reply, I entered the query you suggested and the srvnetname, datasource and srvname are the same. IF this helps. I didn't see any error messages in the logs. There where informational messages but they didn't seem to affect this issue.

Viewing 3 posts - 1 through 2 (of 2 total)

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