Advantage SQL Engine
Enables debug query logging.
sp_EnableQueryLogging(
TableName,CHARACTER, 255,
TruncateExistingData, Boolean
LogOnlyUnoptimizedQueries, Boolean
MinimmTimeBeforeLogging, Integer
EncryptionPassword, CHARACTER, 20 )
TableName (I) |
Name of the table to log queries in. |
TruncateExistingData (I) |
True if existing data should be removed from the table. |
LogOnlyUnoptimizedQueries (I) |
When True, only queries that are un-optimized are logged. |
MinimmTimeBeforeLogging (I) |
The minimum number of seconds a query must be processed by before it will be logged. A value of NULL or 0 means log all queries. |
EncryptionPassword (I) |
On free connections, the password to use if the log table is encrypted. |
sp_EnableQueryLogging is a debug system procedure that forces the Advantage Database Server or Advantage Local Server to log all queries that are executed on the current data dictionary or all queries on non-data dictionary connections. If the server is restarted, query logging must be re-enabled. Because query logging increases the amount of work required to execute a query, it is strongly suggested that this feature only be used during development. To enable query logging on a data dictionary, the user must be logged in as the administrative user, ADSSYS.
The query log table has the following structure.
Name |
Type |
Size |
Comments |
ID |
autoinc |
4 |
Unique identifier for the query. |
Start Time |
timestamp |
8 |
Time and date that the query was began. |
Optimized |
boolean |
1 |
True if the query is properly optimized. |
Return Code |
integer |
4 |
Return Value of the query. |
Rows Affected |
integer |
4 |
Number of rows affected by the query. |
End Time |
timestamp |
8 |
Time and date that the query was ended. |
Run Time |
double |
8 |
Elapsed time the query was processed by the server in milliseconds. |
Database |
char |
255 |
Name of the database the user is connected to. |
User Name |
char |
100 |
User name for data dictionary connections. |
Connection Name |
char |
100 |
Connection name. |
Application ID |
memo |
variable |
Application ID of the application executing the query. |
Query |
memo |
variable |
The query that was executed. |
See Also