How to Test a Database Connection String using NotePad

Create and Configure a Universal Data Link (.udl) File with Notepad.
by Updated November 28, 2017

I just came across a way to test a data providers connection string (like a SQL Server database) with the help of a plain text file using Notepad.  To investigate and test out if your connection string works, your going to want to create a UDL file. To do this, follow these steps:

  1. Open up Notepad and create an empty text file, then click File -> click Save -> and  save it with the File name: TestConnection.udl to your desktop.
  2. Go to your desktop and double-click on the TestConnection.udl file you just created and the Data Link Properties box will popup.
  3. Select the Provider tab and Find the provider that you want to connect with and click Next >>.
  4. Now from the Connection tab, select or enter your source/ server name -> then enter information to log on to server -> and select the database on the server. 
  5. Click Test Connection and click OK to save the file.

Note: If errors occur during testing of your connection string, you will get a popup box with the error message.

Once, you've successfully tested your connection string, now go and compare the details of your TestConnection.udl with your (website) project connection string to see if they are similiar.

 


0
18

18 Comments

anonymous by Ed Carter on 4/15/2011
This was very, very helpful. Consider SQL Server Management Studio connects with any SQL Server database like there is no problem. Then you build your connection string and discover you have to use odbc to connect to SQL Server 2000. This approach showed me that even though I did not even specify odbc at the beginning. Cool!
anonymous by Dennis O'Brien on 5/4/2011
Very useful article. Needed to test a connection string to mirrored SQL Server 2008 databases and this procedure worked very well. Thanks!
anonymous by Reza Ghorbani on 5/23/2012
Great and to the point. Thanks a million.
anonymous by path on 8/17/2012
Thanks so so much. Very Usefull article
anonymous by RT on 11/12/2012
THANK YOU! I have been looking for something like this for awhile.
anonymous by Simon on 1/5/2013
Really great :) worked
anonymous by cymonesays on 1/27/2013
OMG... the absolute best. Too easy, thanks a million!!!
anonymous by Rand on 3/2/2013
This is brilliant! Thank you very much
anonymous by Raj on 3/11/2014
thanku,,,!
anonymous by AL on 9/13/2014

Thanks

anonymous by Mazin on 1/12/2015
really you make my day wonderful
anonymous by Vaibhav on 1/19/2015
very quick way to create the conenction string
anonymous by Matthew on 1/28/2015

That's amazing!! I never knew of this file type before. SO good! you're awesome sir! Thank you!

anonymous by Pedro on 4/17/2015

Didn't know this tool. Cool!

anonymous by Ftlie on 5/22/2015

Even better, just make an empty file, and it will help you create the string :-)

anonymous by Chaoix on 8/3/2015

This is a great tip. Saved me a ton of time debugging.

anonymous by Ramil on 2/9/2023

Thank you for this one. Very useful.

anonymous by Srinivasu Thota on 4/6/2024

Thank you for this useful information

Add your comment

by Anonymous - Already have an account? Login now!
Your Name:

Comment:
Enter the text you see in the image below
What do you see?
Can't read the image? View a new one.
Your comment will appear after being approved.

Related Posts


UPDATE 12-16-2011: If you are using ASP.NET and your website / database is live, and you want to take the database offline, you're better off putting an App_Offline.htm file in your website main directory to first take the website down for maintance (I...  more »

Are you backing up your SQL Server 2008 databases daily? You should be, especially if you don't want to lose any of your precious data that you're storing. It's incredibly easy to setup a maintenance plan in SQL Server 2008 to automatically back up one or...  more »

Here's a step by step process to enable a remote connection to your SQL Server 2008 Express database that is configured on Windows Server 2008 using an assigned port #. 1) First make sure the SQL Server Authentication is enabled and the User name that...  more »

Here's a quick SQL tip on how to get records beginning with numbers only. Use the query string LIKE '[0-9]%' For example: SELECT u.UserId, u.UserName FROM dbo.aspnet_Users u WHERE u.UserName LIKE '[0-9]%' ORDER BY u.UserName Keep in mind, If you are using...  more »

I would like to learn how to get the skills and education to be able to build interactive websites. Can you give me some help and explain how to get started?  more »

If you’ve experienced as many problems as I have while trying to Import/Export my Sql Server 2005 database to a hosting provider for the first time, then hopefully this how-to will be of some assistance to you.  more »

In SQL Server 2008 Management Studio, you may want to change the default settings to allow you to edit more than the 200 rows at a time, or select more than 1000 rows, which are the default settings for SQL Server. To modify "Edit Top 200 Rows" or "Select...  more »

Here's a couple quick SQL database tips for finding and deleting duplicate values in a SQL Server table.To find duplicates in a Column use the following SQL: SELECT ColName1, COUNT(*) TotalCountFROM TableName GROUP BY ColName1 HAVING (COUNT(ColName1) >...  more »