DB2 ‘OPEN’ Cursor unsuccessful probable reasons

The ‘OPEN’ cursor fails during execution of the DB2 program is mainly due to lack of privileges.

  • The privilege set consists of the privileges that are held by the authorization ID of the owner of the plan or package.
  • If the plan or package is bound with VALIDATE(BIND), the authorization check is performed at bind time, and the bind is unsuccessful if any required privilege does not exist.
  • If the plan or package is bound with VALIDATE(RUN), an authorization check is performed at bind time, but all required privileges need not exist at that time. If all privileges exist at bind time, no authorization checking is performed when the cursor is opened. If any privilege does not exist at bind time, an authorization check is performed the first time the cursor is opened within a unit of work. The OPEN is unsuccessful if any required privilege does not exist.

Read more…

DB2 and SQL error codes

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.