Dynamic parameter example analysis

A typical use case for analyzing dynamic parameters is:

  1. Disable statement cache:

    set statement_cache off
    
  2. Prepare the statement to be examined that contains the dynamic parameters.

  3. Select @@plwpid to determine the object ID of the most recent lightweight procedure.

  4. Run show_dynamic_params_in_xml using the value of @@plwpid as the value for object_id, and displaying the result in the local variable named xmldoc1.

  5. Close the statement.

  6. Enable the statement cache:

    set statement_cache on
    
  7. Analyze the results in xmldoc1, and select values for the parameters.