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.
Command option | Option values | Used with |
---|---|---|
CURRENTDATA |
|
Note:
- The
CURRENTDATA(YES)
option is not valid for REBIND of packages for native REST services. - The CURRENTDATA bind option is not valid for REBIND of packages for native SQL procedures or advanced triggers.
Option descriptions
- CURRENTDATA(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
- CURRENTDATA(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.
Default values for CURRENTDATA
Process | Default value |
---|---|
BIND SERVICE | NO |
BIND PLAN | NO |
BIND PACKAGE | NO |
REBIND PLAN | Existing value |
REBIND PACKAGE | Existing value |
Catalog records for CURRENTDATA
See the following columns: DEFERPREP in SYSPACKAGE catalog table and EXPREDICATE in SYSPLAN catalog table.