Home » How to test a database connection from an application server

How to test a database connection from an application server

Problem:

Sometimes you want to test a database connection from an application server. This is useful whether you are testing an SQL alias you’ve created or to see if the SQL server is accessible over the network.

Solution:

A quick solution is to use a Microsoft Data Link, or .udl, file. Creating a Microsoft Data Link file is a snap:

  1. From your desktop, right click on the desktop and choose New > Text file
  2. A new file named New Text Document.txt appears in the directory.
  3. Rename this file to “TestDBConnection.udl”, removing all spaces. Be sure to change its file extension to .udl.
  4. Open the file and, under Connection, type either the SQL server name or, if you are testing an SQL alias, the alias name.
  5. Under 2, chose “Windows Authenticated security”
  6. Click “refresh”
  7. If the connection was successful, list of databases should appear in the dropdown menu under #3.

Resources:

http://msdn.microsoft.com/en-us/library/e38h511e(v=vs.71).aspx

Leave a Reply

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


*