The Oracle Query Rules provide the ability to execute and check the results of a SQL Statement query against an Oracle database.
Any SQL Statement can be defined in the Rule’s text window under Run Following SQL Query Or Stored Procedure
The Rule will parse the row and column output of the query for any numeric or string criteria.
In the built-in Rule QRY_AVAILABLE_PROCESSES, this rule is running the following SQL statement to check if there are too many running processes:
SELECT value FROM v$pq_sysstat WHERE statistic LIKE ‘Servers Busy%’
Since column 1 of the SQL statement result contains the number of running processes, the Rule is defined so that it will break if a value greater than 1000 appears in column 1 of the SQL statement result: