Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

SQL Server can be connected from local system but can not be connected from remote system in the network. The error code is 40 from Visual Studio and 1326 when I try to connect to SQL Server from Management Studio.

  • Firewall isn't the problem
  • TCP/IP connection is enabled from SQL Server
  • There are 2 pc terminals that can connect to the SQL Server but the 3th one cannot and using the same connection strings so the connection string is right

It is SQL server 2000

any help will be appreciated thanks

share|improve this question

migrated from stackoverflow.com Dec 24 '10 at 5:31

This question came from our site for professional and enthusiast programmers.

5 Answers 5

try to ping the server from the third terminal to see if the connection is on between them

share|improve this answer
    
yes there is! I did ping but everything seems fine thanks –  Pinchy Dec 22 '10 at 18:27

There are quite a few reasons with error 40. Look here for more information.

share|improve this answer
    
Thanks for the advice I will have a look! Cheers –  Pinchy Dec 22 '10 at 18:31

As already mentioned, check that you can ping the SQL Server from the 3rd box.

Also, check that the same version of MDAC are installed on the client that is on the server.

See this article for a other fixes

share|improve this answer
    
I am not sure what version of MDAC are installed on the client! I will make sure that they have the same version. Thanks again –  Pinchy Dec 22 '10 at 18:31

Both errors 40 and 1326 suggest a named pipe error, not a TCP error. Since you mention that your server has TCP enabled, but you say nothing about named pipes, I suggest you take named pipes out of the equation. If you don't explicitly disable named pipes, the clients will always attempt this protocol first, and hit various errors as named pipes require SMB connectivity and domain authentication at the file sharing layer before even reaching the SQL Server. You have two avenues:

share|improve this answer

Try connecting from ODBC (Control panel, admin, odbc, new user connection). Try creating a connection and test it at the end of the wizard. If it works, then the problem has something to do with your OLEDB connection string, etc.
Otherwise, it could be

  • a DNS issue (when you ping, make sure the correct IP address comes back)
  • a server permissions issue (see if you can map a drive to the SQL Server and try your connection again)
  • a SQL Permission issue (check the SQL security panel, make sure the user as db_reader permission (minimum) to his/her default database)
  • a bad SQL Alias (in the ODBC wizard, under connection information, make sure the server name is only listed once. If it is in there multiple times, you can install the SQL Client Configuration tools and remove all extra SQL Server aliases, which might be redirecting the [server name] to a different machine or invalid protocol by default).
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.