none
Accessing SQLServer2000 running on Windows Server 2008 R2

    Question

  • Dear All,

    I have a SQL Server 2000 running on Windows Server 2008 R2. From a remote Server, I can access the SQLServer from WINForm app (written in VS 3.5). But unable to connect from the same server, same connection string and same code using WIN Service (written in VS 3.5). My connection string is like below:

    Password=XXXX;Persist Security Info=True;User ID=myUser;Initial Catalog=myDB;Data Source=192.168.X.Y

    it shows below error:

    An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

    I do not have any other version of SQL Server installed in server.

    Thanks in advance for your support.

    Regards,

    Mehedi

    Wednesday, September 11, 2013 7:05 AM

Answers

  • Hm... this one is a puzzle. Usually it is the other way around, it works on the server but it does not from remote server.

    Obviously TCP/IP and/or Named Pipes are configured correctly because you can connect from remote machine. But for some reason network traffic on those protocols is blocked when you are on the same machine as SQL Server!?

    Only thing that comes to my mind is to try to enable Shared Memory protocol that can only be used for connectivity between client and SQL server when client is on the same machine as SQL Server.


    Regards, Dean Savović

    Wednesday, September 11, 2013 7:55 AM