CURRENT GET_ACCEL_ARCHIVE

The CURRENT GET_ACCEL_ARCHIVE special register specifies whether a dynamic SQL query that references a table that is archived on an accelerator server uses the archived data. The special register does not apply to static SQL queries.

The data type is VARCHAR(255).

Valid values are:

NO
Specifies that if a table is archived on an accelerator server, and a query references that table, the query does not use the data that is archived.
YES
Specifies that if a table is archived on an accelerator server, and a query references that table, the query uses the data that is archived.

The initial value of CURRENT GET_ACCEL_ARCHIVE is determined by one of the following settings:

  • The value of Db2 subsystem parameter GET_ACCEL_ARCHIVE. The default for the initial value of that subsystem parameter is NO unless your installation has changed the value.
  • If specified for the bind of a package, the GETACCELARCHIVE bind option. This behavior enables the GETACCELARCHIVE bind option to be used to specify the acceleration archive behavior for dynamic SQL queries and not only static SQL queries. This bind option does not have a default value.

The initial value of CURRENT GET_ACCEL_ARCHIVE in a user-defined function or stored procedure is inherited according to the rules in Special registers in a user-defined function or a stored procedure.

You can change the value of the register by executing the SET CURRENT GET_ACCEL_ARCHIVE statement.

The precedence order (lowest to highest) for setting the value of the special register is as follows:

  • The GET_ACCEL_ARCHIVE subsystem parameter
  • The GETACCELARCHIVE bind option, if specified
  • An explicit SET CURRENT GET_ACCEL_ARCHIVE statement
Example: The following statement sets the CURRENT GET_ACCEL_ARCHIVE special register so that when a table is archived on an accelerator server, the table reference does not include the archived data.
  SET CURRENT GET_ACCEL_ARCHIVE=NO;