DB2: How to Fix Cursor Open Error Quickly

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


Resolution to Fix Cursor Open Error

  • 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.

Next step to improve DB2 skills

SQL and DB2 Skills Make You King in your Current or Future Projects

Read more…

Author: Srini

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