Hi all, at time we are testing the SQL Anywhere Monitor and we are missing the user in the email alerts especially alerts for long taking queries. Is there a possibility to konfig the alerts, so that we know which user executes which query? Thanks a lot and regards from germany Sabrina |
Which version of SQL Anywhere are you using?
If the Monitor is a different version, what is it?
Server version and monitor are the same: 12
SA Monitor 12 does show the connection name and the connection number (see connection 'ddd12-1' (ID 13) below)
Are you looking for the SQL Anywhere database user id, or the operating system user id, or both? (I don't think the SA Monitor shows either, at least not for version 12).
=====
Query run time threshold exceeded
Priority: Medium Server: ddd12 Database: ddd12 Host: localhost Time: 2015-08-04 09:50 EDT A query has been running longer than the 10 s threshold. A query issued by connection 'ddd12-1' (ID 13) has been running for 34 s. The query is as follows: SELECT COUNT_BIG(*) -- very long FROM SYSCOLUMN AS A CROSS JOIN SYSCOLUMN AS B CROSS JOIN SYSCOLUMN AS C
To solve this problem, try closing the connection that issued this query. Check the query to make sure that it is not unnecessarily costly (for example, using a JOIN without a WHERE clause).
A long running query may also be symptomatic of a database server under a heavy workload. Check that the database server is not currently performing cache- or CPU-intensive queries, and that the number of connections is within acceptable limits.
SA Monitor 16 (which works with a V12 target database) shows the same information in an email (see below). I haven't been able to get SA Monitor 17 to send an email.
Foxhound shows even less connection-specific data in alert email, but it does make it easy to find what you are looking for in the extensive history it keeps; see this section in the Foxhound white paper.
=====
Query run time threshold exceeded
Priority: Medium Server: ddd12 Database: ddd12 Host: localhost Time: 2015-08-04 16:58 EDT A query has been running longer than the 10 s threshold. A query issued by connection 'ddd12-1' (ID 2) has been running for 32 s. The query is as follows: SELECT COUNT_BIG(*) -- very long FROM SYSCOLUMN AS A CROSS JOIN SYSCOLUMN AS B CROSS JOIN SYSCOLUMN AS C
To solve this problem, try closing the connection that issued this query. Check the query to make sure that it is not unnecessarily costly (for example, using a JOIN without a WHERE clause).
A long running query may also be symptomatic of a database server under a heavy workload. Check that the database server is not currently performing cache- or CPU-intensive queries, and that the number of connections is within acceptable limits.