A fix is available
APAR status
Closed as program error.
Error description
SQLCODE +394 and SQLCODE +395 are not issued consistently for Optimization Hints. A bug is causing the error sqlcode not to get propagated up to higher level query blocks. If a hint is not used for a lower query block, then the entire query should get SQLCODE +395. SQLCODE +394 should only be issued of all of the columns that DB2 validates for Hints should pass.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All DB2 R710 and R810 users of Optimization * * Hints. * **************************************************************** * PROBLEM DESCRIPTION: SQLCODE +394 and SQLCODE +395 are * * not issued consistently for * * Optimization Hints. * **************************************************************** * RECOMMENDATION: * **************************************************************** SQLCODE +394 and SQLCODE +395 are not issued consistently for Optimization Hints. A bug is causing the error SQL code not to get propagated up to higher level query blocks. If a hint is not used for a lower query block, then the entire query should get SQLCODE +395. SQLCODE +394 should be issued if all of the columns that DB2 validates for Hints are passed for each row of the PLAN_TABLE for the given query. Also, if hints are provided on some but not all rows in the PLAN_TABLE for a given query, then that query could incorrectly receive SQLCODE +394. SQLCODE +395 should be issued in this situation instead. ADDITIONAL KEYWORDS: OPTHINT SQLCODE395 SQLCODE394 SET CURRENT OPTIMIZATION HINT
Problem conclusion
Code is changed so that SQLCODE +395 is issued if there are any query blocks in which the hint is not used. SQLCODE +394 will be issued if the hints are used for all query blocks of the query, for all PLAN_TABLE columns that DB2 validates for Optimization Hints. If there are hints provided for some rows in the PLAN_TABLE but not others for a given query, then SQLCODE +395 will now be issued.
Temporary fix
Comments
APAR Information
APAR number
PK10015
Reported component name
5740 IBM DATABA
Reported component ID
5740XYR00
Reported release
810
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2005-08-05
Closed date
2005-09-30
Last modified date
2005-11-02
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UK07747 UK07748
Modules/Macros
DSNXOGP DSNXOPT DSNXOPTH
Fix information
Fixed component name
5740 IBM DATABA
Fixed component ID
5740XYR00
Applicable component levels
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.
Rate this page
Please take a moment to complete this form to help us better serve you.
