0 / 0
Inaccurate query results for Db2 z/OS remote data sources in Data Virtualization

Inaccurate query results for Db2 z/OS remote data sources (Data Virtualization)

If you run queries with scalar functions against Db2® z/OS® remote data sources, that use the Db2 connection type, these queries might return inaccurate results.

Symptoms

You run some queries with scalar functions against Db2 z/OS remote data sources that use the Db2 connection type. You get results of 0 records for these queries.

Causes

Optimized pushdown is not working properly for queries against Db2 z/OS remote data sources that use the Db2 connection type.

Resolving the problem

To solve this issue, run the following commands to set the required Db2 registry variable. A platform administrator must run these commands from the c-dv2u-cv-db2u-0 pod. After entering the container, the administrator must change to the db2inst1 user by using the command su - db2inst1.

These commands will first get the current setting of the DB2_DV_OVERRIDES variable, then add the NO_SSPD(DB2) setting to the variable, and then ensure SQL statements are flushed from the package cache.

  1. Obtain the current settings of the DB2_DV_OVERRIDES variable.
    db2set | grep DB2_DV_OVERRIDES
    For example the output of the previous command might be:
    DB2_DV_OVERRIDES=EN_OJMQT,EN_JOINFILTER,EN_GAIANQUERY_JOINFILTER
  2. Using the value from step 1, update the variable setting. The new value for the variable is formed by taking the prior value and appending `,NO_SSPD(DB2)`.With the above example the new value would be:
    `EN_OJMQT,EN_JOINFILTER,EN_GAIANQUERY_JOINFILTER,NO_SSPD(DB2)`
  3. In the following command, use the value determined in step 2 to provide new_variable_value.

    db2set | grep DB2_DV_OVERRIDES; 
    db2set -im DB2_DV_OVERRIDES="new_variable_value";
    db2 flush package cache dynamic; 
    • To update the variable only for the a single query, append the following directive to the query text.
      /*<OPTGUIDELINES><REGISTRY> <OPTION NAME='DB2_DV_OVERRIDES' VALUE='new variable value'/></REGISTRY></OPTGUIDELINES>*/

      For more information, see Optimization profiles and guidelines

    • To update the variable globally, use the following method.
      db2set -im DB2_DV_OVERRIDES="new variable value";db2 flush package cache dynamic;
Note: This problem does not apply to IBM Db2 Database data sources.
Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more