THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Andy Leonard

Andy Leonard is CSO of Linchpin People and SQLPeople, an SSIS Trainer, Consultant, and developer; a Business Intelligence Markup Language (Biml) developer; SQL Server database and data warehouse developer, community mentor, engineer, and farmer. He is a co-author of SQL Server 2012 Integration Services Design Patterns. His background includes web application architecture and development, VB, and ASP. Andy loves the SQL Server Community!
Note: Comments are moderated. Spam shall not pass! </GandalfVoice>

Quick Database Connectivity Testing

Introduction

Ever find yourself needing to test connectivity, but you’re on a machine with no client tools? It happens to me occasionally. Here’s one trick to help:

UDL files

Right-click on the Windows Desktop, hover over New, and click Text Document:

Rename the file to test.udl:

Because you are changing the extension, you will be prompted:

Click Yes. Double-click the test.udl file to open the Data Link Properties window. Enter (or select) the server name, select integrated security or SQL Login and provide credentials, then select or enter a database name:

Click the Test Connection button to test connectivity:

Conclusion

There you have it – a way to test connectivity without database client tools installed!

:{>

Published Friday, August 26, 2011 1:00 PM by andyleonard

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Chuck Rummel said:

Another way I've used before on web servers is to set up a new ODBC connection.  You can use the Test Connection button and then delete the connection you just created.

August 27, 2011 11:12 PM
 

Christian Nitz said:

There are these other possibilities for the outcome of the test step:

1: Microsoft Data Link Error

"Test connection failed because of an error in initializing provider.[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access denied."

In my experience this is never actually access denied, and is always a connectivity problem. (firewall, port, ip, etc.)

2: Microsoft Data Link Error

"Test connection failed because of an error in ititializing provider. Login failed for user '<username>'."

In contrast to the other error message, this one does indicate access was denied while the connection itself was successful.

August 29, 2011 2:31 PM
 

Robert L Davis said:

Very handy! I have a VBS script that I use for this, but this is much simpler!

September 12, 2011 11:18 AM
 

kaka said:

Thanks a lot, you have helped me.

June 21, 2012 7:10 AM
 

Jane said:

Fantastic. Thank you.

September 14, 2012 6:28 AM

Leave a Comment

(required) 
(required) 
Submit

This Blog

Syndication

My Company


Other Blog

Check out my personal blog...
http://andyleonard.me

Contact Me

Twitter: @AndyLeonard
Email: andy.leonard@gmail.com

Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement