Test if query running against multiple servers

  • Hello,

    To start out I'll make the statement that I don't think this is possible, but...

    Does anyone know if a T-SQL statement can test to see if it is running against multiple servers via the Registered Servers feature? As I say, I don't think it can, but I just want to check. My reason for thinking that it isn't possible is that I believe the Registered Server feature simply runs the same script in a loop against a collection of instances. Is this correct?

    My reason for asking is I have a script to check properties on an instance and need to run it against my Registered Servers group for it to obtain meaningful results. I would like to alert the user of the script if they are not running it against a Registered Server group so that they know not to trust the results.

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply