meta data for this page

Retrieving SQL code from a query

It can happen, for example for a debug, that you want to know which SQL code is actually executed on the database server. If statistics are activated, you only have to search for the line related to desired execution in VIGILENS_EXEC of statistics database. SQL code is stored in QUERYSQL column.

If statistics are not activated, here is how to proceed.

WARNING: the following manipulation requires :

  • administrator privileges on the machine
  • the modification of the registry, which is not insignificant
    • ⇒ save your registry before modification!
    • Vigilens will not be held responsible for the consequences of inappropriate modification of the registry.

Procedure

  • In windows, search for regedit, right-clic > Run as administrator

  • Navigate in the tree structure to the node Computer > HKEY_LOCAL_MACHINE > SOFTWARE > Wow6432Node > EVIDENS > Param (Computer > HKEY_LOCAL_MACHINE > SOFTWARE > EVIDENS > Param 32 bits machines)
  • in the right pannel, right-clic > new > Valeur DWORD 32 bits

  • edit the value of the key, in hexadecimal form :
    • 1 ⇒ the log will be created
    • 0 ⇒ the log will not be created
  • The log file will be created in the same folder than designer “.exe”.

Only the last SQL query will be displayed in the log file.