Running Adhoc queries against multiple servers using SSMS 2008

Getting information from multi servers for a query is a big process for DBAs and we don’t have a direct option available till SQL 2008 Client tools. We need to write our own manual batch file to execute the query against all the server to fetch the information. In SQL Server 2008 management studio MS team has introduced this in SQL Server management studio 2008.

This is a good feature for DBAs to capture the information in one stretch across all the servers. The destination servers can be SQL2000 or SQL2005 or SQL2008 (if you are using sql2k then your queries shouldn’t use any new features, say if you use DMVs and if you try to execute it against SQL2K, then you will be thrown with error). To use this feature first you need to register all the list of servers under registered servers. Once its done you can right click on the group and click on new query and execute it. You can find the details in the images shown below







Leave a Reply

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