Home / Tips / Blog article: Easiest Way to Generate Connection String And Verify Database Connectivity

| RSS

Easiest Way to Generate Connection String And Verify Database Connectivity

July 30th, 2010 | No Comments | Posted in Tips

There are two things which I as a consultant / developer come across many times. One is verifying connectivity to a database which is often a cause of production issues and second is creating valid connection string in the least amount of time. This is the way I do it. Hopefully it will be of help to you.

First of all forget that you have Visual Studio, SSMS or anything so big and fancy. You just want to get a connection string baked up pronto. I usually end up creating a .udl file. UDL which stands for Universal Data Link allows you to establish a connection and then stores the connection string in text format. Doing this is very simple. Create a file in any folder or desktop and call it test.udl.

Now double click the file and you’ll get a window where you can enter your connection properties.

 image

You can also select different providers.

image

Once you have filled in the information about your server, security and database just click on Test Connection to verify connectivity. Click OK to close the window.

To get a connection string with information you just entered just open the test.udl file in a text editor and you’ll see the connection string.

 image

That’s it. Simple and easy ninja style.

Leave a Reply 823 views, 1 so far today |
Tags: , ,

Leave a Reply





Switch to our mobile site