Robert J. Hatton

Business Intelligence Developer & Author

Find all of your SQL Servers

August 11, 2016 By robhatton314@gmail.com Leave a Comment

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmail

It’s surprising to find out how few organizations have a list of all of their SQL Server instances. In the past, building such a list was an onerous task. It turns out that there’s a great way to to find out about all of the SQL Server instances that a given server can see. Just ask SQL Browser!

As PowerShell can reach into the .Net object model, it’s a great platform for simple tasks like this. To use it, you need to remote to a desired SQL Server, start PowerShell, and paste in this command:

[System.Data.Sql.SqlDataSourceEnumerator]::Instance.GetDataSources()

This will produce a list of servers along with the instance name (if any) and the server version number.

It’s a simple solution to an annoying problem!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Follow Me

rss

Database Spelunking

Spelunking, for those who don’t know is exploring caves. In some ways, that’s what it’s like to find your way around in databases in some organizations. It’s especially difficult without a flashlight. This PowerPoint presentation will provide some tips, techniques, and several scripts that can help shed light on your data cavern. The attached ZIP […]

SQL Style presentation

Thanks to all who joined in the SQL Style presentation at the Tampa SQL Saturday. It was great to have folks involved during a presentation. It doesn’t look like I can attach the presentation, but it’s available on the SQL Saturday website. The queries are right here: –Example Queries use Fruit go select * from […]

Categories

Copyright © 2025 Robert J Hatton