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 to deal with. Sure, if you are a DBA making an ODBC or a JDBC connection, it is not a big deal. Actually, it is a pretty routine affair. But to every one else trying to 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 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 there like me who wonder why gathering a few parameters and making a connection can be such a traumatic experience.
I have assisted others countless times for many years in getting third party tools and just getting connected to local instances of their DBMS.
Using the Code
The utility is simple to use. You can place the files in any directory on your local machine. To run the program, open up the command prompt, change the directory to where you placed the files, and type the following command line:
The program will return the server name and the port number for any instance of SQL Server that is on your local machine. Shown below is the code:
<Script language="JScript" src="Class_Connection.js"></Script>
Points of Interest
There are over 500,000 indexed pages on Google alone pertaining to connection problems with SQL Server, under the following keyword searches:
- [connection problems "sql server"]
- [troubleshooting connection "sql server"]
- ["hard to connect" "sql server"]
- [connect* pain "sql server"]
This is the first version of this utility. Updates for this program will be available here.