[DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection

There is some problem  -2147467259 [DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection.

Microsoft SQL Server is a good Database management system. It provides a vast variety of features. You can deploy the application anywhere in the world and connect it to the SQL Server to store the data. You just need to open the default or designated port on the server and in your windows firewall. Once you are done with the port setup, you are good to go to connect your application with Microsoft SQL Server. However, it can create issues in some scenarios. The port was configured properly for my setup. I was able to access Microsoft SQL Server from remote location using SQL Server Management Studio. Invalid connection was clearly giving an idea that it has something to do with the configuration of my application.

Microsoft SQL Server was configured to use the default port on all IP addresses. Microsoft SQL Server Configuration Manager was configured correctly. I tried every possible way to connect the application to Microsoft SQL server from remote location but it failed every time. After wasting around 1 hour, I accidentally tried listed solution of this problem. This worked for me and hopefully it will work for someone else as well. The application was already developed. The ODBC driver was already configured. I had to find some other way to connect the application.

The client machine which is going to connect to the Microsoft SQL Server must be configured using listed way.

Make sure that Microsoft SQL Server is configured to allow connection from Network. You can choose any port or 1433 default Microsoft SQL Server port will work.

Now enter the IP address of the Microsoft SQL Server Machine with port like given below:

203.101.158.59,1433 (Public IP address of the Server,Microsoft SQL Server port).

If you need any help to configure the Microsoft Windows Firewall, please follow this URL.

For port address translation (PAT) of your respective router consider visiting the appropriate website of your router or firewall to allow out side traffic into your network.

I hope this solved your problem, share this article with your friends on facebook and twitter.

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.