[DBNETLIB][ConnectionOpen (Connect()).] - Most Common SQL Error

Lets now go to some problem that most of the people who are working with SQL Server should have faced this at some point of time... :-) Yes.. you are right.. the most frequent problem that most of us face is connectivity with SQL Server client tools.

This is one of the most irritating errors and tests the patience. Lets see some trouble shooting techniques to overcome this error .
First of all see if the SQL Server Service (MS SQL Server) is running or not. Once you have confirmed that the SQL Server service is up and running fine then come to the next step.
Now that you have found that service if fine, lets go and see if the port (1433) is opened and if TCP/IP is enabled or not.
Lets see how this could be done now.
One of the causes for this to happen is the client is not able to talk to the server on 1433 port. Go to SQL Server Configuration Manager and select “SQL Server Network Configuration” node. Now you will see that TCP/IP protocol is disabled. Enable the protocol and go to properties.

Now, open the properties of the TCP/IP protocol and enable IP2 (basically where the static IP address is mentioned) and disable other IP nodes. In my case here, the static IP is shows in IP2 and have marked Active as Yes , Enabled as Yes and TCP Port as 1433.

Once done, click on Ok button and you are ready to take the flight.
Even more easier testing would be testing first by using a .UDL file.
Now lets see if a userdefined .udl file will be able to access the SQL Server (Just to isolate things)
How to create an UDL :
1. Open a normal notepad file and save it with .udl extension. (Lets suppose the name given in abc.udl)
2. Now open the udl file that you have just created (In our case, this is abc.udl)

3. When UDL file opens, it shows “Connection” tab. Go to Provider tab and select the provider that you are using. Here we are using SQL Server. So select the “Microsoft OLE DB Provider for SQL Server” and click on Next button.
4. Now enter the required server name and select the authentication (either Windows or SQL authentication) and click on Test Connection. In case if the Test Connection succeeds, then there should be some other problem with the way the application is connecting to the server.

Click on "Test Connection" to see the following dialog.

Now if the Test Connection succeeds, the SQL Server client is able to talk to the server over the network.

Thanks for going through the post. Have a great day.

Please leave your comments on the posting.

No comments: