Adaptive Server ODBC Driver allows application users and administrators to monitor driver and database performance.
Access to this information is available both programmatically by using the application, and externally using a new utility, aseodbcstatus. To use the utility, you must configure instrumentation to use shared memory.
SYBASE_ODBC_STATEMENT_DIAGNOSTICS_SHMEM=<number of diagnostic sections to put in one shared memory segment> (example 512)To enable shared memory instrumentation, set SYBASE_ODBC_STATEMENT_DIAGNOSTICS_SHMEM to a value greater than zero (the default).
Setting the environment variable to a small number may cause Adaptive Server ODBC Driver to use many shared memory segments, which in turn, depending on the operating system, might carry a performance impact. Setting the environment variable to a large value might cause the Adaptive Server ODBC Driver to use a shared memory segment larger than necessary.
If you know approximately the number of statements your application uses, set the value of SYBASE_ODBC_STATEMENT_DIAGNOSTICS_SHMEM to a few more than that number. For example, if your application uses between 250 and 350 statements, set the value of SYBASE_ODBC_STATEMENT_DIAGNOSTICS_SHMEM to 360. If your application uses a wide range of statements (for example, between 100 to 10000 statements), using the maximum number of statements may use too much memory when the application does not use all of the statements. Instead, use a smaller value and allow the number of memory blocks to increase. In this case, try using double the smallest number of statements the application typically uses.
To retrieve instrumentation data, use the aseodbcstatus utility, which connects to the shared memory segments and displays instrumentation data.
<instrumentation name>:<time in us>,<count >For example:
Unknown:0,0; SocketRetrieve:75,19; Waiting for lock XATransactionManager:0,0; Holding lock XATransactionManager:0, 0; SQLAllocHandle:149,20;