Testing SQL Server Database Connection

 

Sometimes the application owners can come to you because the application cannot connect to the database. In this case, a DBA must first test the connection from the application server to the database.

It is very easy to test this connection if you have SSMS (SQL Server Management Studio) on the application server. You can test the connection by opening SSMS and clicking Connect in the top left and entering the Instance Name, user name and password.

In some cases, SSMS may not be installed on the application server. In this case, create a new, blank text document with any name anywhere on the application server and change the .txt extension to .udl. Then when you open this file, you will see a screen like below.

Enter the name of the instance to which you want to connect to the section named “Select or enter a server name:”.

In the section “Use a specific user name and password:”, enter the name of the login to which the application is connected.

Finally, in Password, enter the password of the login that uses the application and click “Test Connection”.

If the test connection is successful, a connection to the database is available. If it fails, run the cmd command line as an administrator in the application and run the telnet command as follows.

If a blank screen appears on the command line as a result of this operation, the port is open. If not, you should ask the system security team in your organization to open the required port.

When making the request, you must declare the application server as the source and the database server as the destination.

Necessary authorizations must be defined between the destination and the source servers for the port in which the database is running.

dbtut
Author: dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

Your email address will not be published. Required fields are marked *