How to: Change the Connection Associated with a Query
SQL Server 2005
A query can be executed against several different servers or databases by changing the connection used by the query.
A query can be executed against several different servers or databases by changing the connection used by the query.