GETACCELARCHIVE bind option

The GETACCELARCHIVE bind option specifies whether a static SQL query that is bound for acceleration retrieves archived data on the accelerator, instead of active data. If the bind option is specified, it also provides the initial value for the CURRENT GET_ACCEL_ARCHIVE special register that is used for dynamic queries, if a SET statement has not been issued for the special register.

When a package that is bound with this bind option runs, the GETACCELARCHIVE value, instead of the GET_ACCEL_ARCHIVE subsystem parameter, provides the initial value for the CURRENT GET_ACCEL_ARCHIVE special register. The CURRENT GET_ACCEL_ARCHIVE special register specifies whether a query that references a table that is archived on an accelerator server uses the archived data. Therefore, by rebinding the application package with the GETACCELARCHIVE bind option, you can also specify that accelerated dynamic SQL queries in an application retrieve only archived data on the accelerator. You can specify this bind option instead of either modifying the application to add an explicit SET CURRENT GET_ACCEL_ARCHIVE statement or setting the GET_ACCEL_ARCHIVE subsystem parameter. For dynamic SQL queries in a package, the bind option value that is specified overrides the GET_ACCEL_ARCHIVE subsystem parameter. This bind option does not have a default value, so if you do not specify this bind option, the GET_ACCEL_ARCHIVE subsystem parameter initializes the special register.

Command option Option values Used with
GETACCELARCHIVE
  • (NO )
  • (YES )
Note:
  1. The GETACCELARCHIVE bind option is not valid for REBIND of packages for native SQL procedures or advanced triggers.

Option descriptions for GETACCELARCHIVE

GETACCELARCHIVE(NO )
Specifies that no static SQL query is bound to retrieve archived data from the accelerator. If the static query also is not bound for acceleration, the query is bound to run in Db2.

If the static query is bound for acceleration because the QUERYACCELERATION bind option was specified, the query is routed to the accelerator when the application runs; however, the query does not retrieve any archived data.

GETACCELARCHIVE(YES )
Specifies that if all of the following criteria are met, the query is bound for acceleration and retrieves the archived data on the accelerator when the application runs:
  • The QUERYACCELERATION bind option is also specified.
  • The static SQL query references an accelerated table that has partitioned data archived on an accelerator.
  • The static query satisfies the acceleration criteria that is specified by the QUERYACCELERATION bind option.

If the static query does not satisfy the acceleration criteria that is specified by the QUERYACCELERATION bind option, the BIND or REBIND PACKAGE operation fails with an error message for that query.

Default values for GETACCELARCHIVE

Process Default value
BIND PACKAGE None
REBIND PACKAGE None

There is no default value for this bind option. The GETACCELARCHIVE bind option does not inherit the setting from the GET_ACCEL_ARCHIVE subsystem parameter.