SQL Server Information and Resources

SQLINFO.net is a Community Service from DataExpressions makers of dbOrchestra©                 

Google
 


SQL Server Resources

Connection Information


Easily find SQL Server connection information

Do you need to determine connection information for one or more instances of SQL Server (versions 2005, 2000, 7.0) on your local machine? (be it a server or a PC)

Here is a simple solution to a problem that is a royal pain in kiester to deal with. Sure, if you are a DBA making an ODBC or a JDBC connection is not a big deal. Actually it is a pretty routine affair. But to every one else that is trying to maintain run a local instance of SQL Server it is not so easy. I can't tell you how many developers, designers, test engineers, report writers and other professionals we have supported over the years in this very endeavor. 

If you can remember back to the last time you had to make an initial connection you are probably nodding your head and chuckling. Many of you did it so long ago you probably forgot where to get this information...especially the port number. I am sure there are many of you out that like me wonder why gather a few parameters and making a connection can be such a traumatic experience?

Those of you that have had bad experiences connecting you can come out of the closet. I recently Googled the following keywords and as you can see the number of indexed pages would indicate that it is not just you and I are the only ones that have had this problem.

How to use

The utility is quite simple to use. You can put the files in any location on your PC or server. Then at the command prompt run the batch file. SQL Server Finder will return connection information for any version and instance of SQL Server on the local machine which it is run from.

What can I do if I still cannot connect using the server name provided?

Without getting into gory detail there may be occasion where using the server name in the connection screen may not work for you. You may sometimes have to use the TCP address. Now that you have the port number you can use the netstat command to determine the TCP address. (Please note: If you are using named pipes only you should not have this problem, and will not find a TCP address associated with the port)

If you are using SQL Server 2005 perform the surface area configuration.

FAQ's about SQL Server Finder

QUESTION? Does it matter where I run the script from?
ANSWER No. As long as the files included live in the same directory you are good to go.
QUESTION? Seems like an whole lot of code for just this task. Why?
ANSWER The files Common_File_Function.js and Class_Connection.js represent an api library that we reuse. You are free to explore and use the code in this library as well. We do have plans in the near future write up and document this library.
QUESTION? How are you figuring everything out?
ANSWER We use WMI (Windows Management Instrumentation) and windows scripting shell to read registry SQLPath and SQLDataRoot to find the path of the SQL Server ERRORLOG file. We then parse the log to find the applicable information.
QUESTION? You showed us how to find the TCP address given. Any change you might add this functionality so we do not have to find it out on our own?
ANSWER Maybe in the next version.
QUESTION? Can you determine SQL Server connection information for a PC or server outside of the local machine where this utility is installed?
ANSWER No, sorry we cannot. We do not have plans to do this either as the security issues are just to much to contend with. We want to keep this a simple easy to use utility.

Download SQL Server Finder

To install just unzip to desired directory location. No additional configuration is required.

Authors:

Win-Bin Huang

Eric Matthews

 

 

 

 



Copyright 2006-2007 by DataExpressions --- All Rights Reserved            dbOrchestra - SQL Server home page