0 Replies Latest reply on Apr 9, 2018 2:26 PM by 300

    Is it possible to run a custom SQL on all DBs of an instance/host?




      I have a custom SQL that I run on all the nodes on which SQL Server Db is installed. I use "SQL Server User Experience Monitor" component for this.

      The problem is we have multiple DB instances on each host/node. Some of these DB instances have multiple databases created on them.


      What we have done until now is that we created one template for all the hosts that don't have multiple instances created on them. Then there are templates for each instance. Say instance1 template for all the nodes who have DB instance1 on them. But this is possible because the instance names are in a specific format.


      Further down the line, when there are multiple database on each instance, how can we run specific SQL on each of the databases present on an instance.

      For an example case I want to check if the database state was changed for each individual database that is configured on database instance.


      Is there a way to do this without manually creating separate components for each combination of node-instance-database?