Wednesday, January 9, 2013

Test DB Connection w/o SQL Server Installed

There are times you do not have Management Studio installed on a server and need to validate a connection can be made to the database tier. The easiest way to do this is by creating an empty file and saving it with a .udl extension (e.g. TestDBConnection.udl). This opens a native connection tool. Be sure to know the type of security, account to be used, and the connection provider you will use (look in your config file). If you are missing the SQL Server Native Client in the provider tab, it is not installed on your server. This needs to be installed if you are targeting this provider in your code (which is the most effecient way to connect to a SQL Server db). You can then open the file and see the connections string that was generated.

No comments:

Post a Comment