jayoub1 (4/4/2013)
04/04/2013I am a newbe database admin and I have been tasked to run queries against multiple databases. Each server has an instance and each instance has 10 or more databases. I need to know if there is an easy way to run a query on all the databases at once.
The way I do it now is by adding the database name each time. For example, the beginning of the query you have
USE [database name] ….
I type in the database name every time and execute and grab the results. This method was ok when the instance had only 1-2 production databases but now I have instances that have 10 or more databases plus the system databases. .
I tried using Registered Servers but it was not running against all the databases
Your help is appreciated.
Thanks,
Jeff
You can also try this http://www.sqlserverunlimited.com/?p=72