CURRENTDATA bind option

The CURRENTDATA option determines whether to require data currency for read-only and ambiguous cursors when the isolation level of cursor stability is in effect. It also determines whether block fetching can be used for distributed, ambiguous cursors.

CURRENTDATA
  • ( NO )
  • ( YES )
On: BIND and REBIND PLAN and PACKAGE, REBIND TRIGGER PACKAGE

Start of changeNot valid for REBIND of a native SQL procedure package.End of change

( NO )
Specifies that currency is not required for read-only and ambiguous cursors. Block fetching for distributed, ambiguous cursors is allowed.
If your application attempts to dynamically prepare and execute a DELETE WHERE CURRENT OF statement against an ambiguous cursor, after that cursor is opened, use of CURRENTDATA(NO) is not recommended. You receive a negative SQLCODE if your application attempts a DELETE WHERE CURRENT OF statement for any of the following cursors:
  • A cursor that is using block fetching
  • A cursor that is using query parallelism
  • A cursor that is positioned on a row that is modified by this or another application process
( YES )
Specifies that currency is required for read-only and ambiguous cursors. DB2® acquires page or row locks to ensure data currency. Block fetching for distributed, ambiguous cursors is inhibited.
Restriction for remote rebinds: You cannot use CURRENTDATA when rebinding a package at a remote server. To change the value of CURRENTDATA, you can:
  • Issue BIND REPLACE, remotely or locally.
  • Free the package and issue BIND ADD, remotely or locally.
  • Rebind the package locally at the location where the package resides.
Defaults:
Process Default value
BIND PLAN NO
BIND PACKAGE NO
REBIND PLAN Existing value
REBIND PACKAGE Existing value
Catalog record: Column DEFERPREP of table SYSPACKAGE and column EXPREDICATE of table SYSPLAN.