IBM Db2 Data Management Console

nested-group-icon.png

DB2

Expand all | Collapse all

Actual vaules for host variables

  • 1.  Actual vaules for host variables

    Posted Tue January 19, 2021 03:23 PM

    Hi, I watched the DataView Show #6: Introducing the NEW IBM Data Management Console (DMC) and in the end they said that you can configure DMC to capture and show actual values from host variables/parameter markers in SQL queries.

    Where can I find and configure this in DMC v1.3.2?



    ------------------------------
    Lennart Selander
    ------------------------------



  • 2.  RE: Actual vaules for host variables

    Posted Tue January 19, 2021 06:17 PM
    Hi Lennart,

    The option to change predicate LITERAL values to parameter markers (?) can be turn off in monitor profile.  The option is called "Normalize captured SQL statements".  e.g. 


    By default, this option is turned on.  So, queries with predicate using LITERAL values will be replaced with ?. 
    e.g. the ID = 123 predicate below will be replaced with ID = ?
    From:
    SELECT SALARY FROM EMPLOYEE WHERE ID = 123;
    To:
    SELECT SALARY FROM EMPLOYEE WHERE ID = ?;

    If this option is turned off, the replacement of 123 to ? will be disabled, and you can see the original statement text with LITERAL values.

    Please note:  The ability to capture the host variable / parameter markers values bind to the SQL statement is not available in DMC.  

    Thanks.



    ------------------------------
    Jason Sizto
    ------------------------------



  • 3.  RE: Actual vaules for host variables

    Posted Thu January 21, 2021 10:59 AM
    Many thanks Jason, that worked right away.

    ------------------------------
    Lennart Selander
    ------------------------------