ManageEngine® SQLDBManager Plus
Execute Query Action
On the occurrence of an alarm, a specific query can be executed. To execute a query, follow these steps:
Select the Action link from the top menu.
Click on Create Action to finish. This will create the required query action. Whenver this action is associated to an alarm, the query will be executed and the results will be sent to the email specified for this query action.
Example: * You can execute any query on your SQL Server using Execute Query function. You need to provide the query that needs to be executed in an event of an alarm in the following format: select * from databasename.schemaname.tablename
Example: select * from msdb.dbo.sysjobs
Note: If databasename is not provided, default database ( master ) will be selected on which the query will run.
To create additional new query action or remove query actions, click on Actions > View Actions or click on Admin > Actions. This will list the entire set of actions created so far. Under Execute Query Action(s) widget, you will find the list of query actions you have created earlier.
You can either edit these actions by clicking on the edit link or click on the query name which will open up a pop-up window to display the current query being executed. You can update the query and click 'Update'. You can also have a trial execution of the action. To do so, click the Execute icon of that action.