Thanks roballen much appreciated.
I'll try that out as a workaround, that solution may be ok for a limited set of queries where you can use snapshots.
However, as a DPA user, why would I think a custom alert would operate any differently to a normal alert?
My expectation is that I provide the custom sql, and that DPA runs it against each known database. I think that is what most people would expect from a monitoring tool.
At the moment, custom alerts are severely limited in function, and the documentation doesn't even hint that you don't get a choice of database.
Custom Alerts
Custom Alerts are user-specified queries that are run against the monitored database or the Database Performance Analyzer Repository. The query returns a
number (or set of numbers) that may trigger an alert depending on user-defined threshold settings.
For example, you could enter a query to detect the number of cancelled orders in the last ten minutes.
select count(*) from orders where status=’CANCELLED’ and date > sysdate – 10/1440;
How can you run that custom SQL in the example above if you do not know whichdatabase it will connect to?
At the very least, I would expect an option to select which database(s) to run it against.
Sorry for the rant - my new toy is borked, and I want it fixed