The SQL statement SET DATASKIP

An application can use the SQL statement SET DATASKIP to control whether a fragment is skipped if it is unavailable. Applications must include this statement only in limited circumstances, because it causes queries to return different results, depending on the availability of the underlying fragments. Like the configuration parameter DATASKIP, the SET DATASKIP statement accepts a list of dbspaces that indicate to the database server which fragments to skip. For example, suppose that an application programmer included the following statement at the beginning of an application:
SET DATASKIP ON dbspace1, dbspace5
This statement causes the database server to skip dbspace1 or dbspace5 whenever both of these conditions are met:
  • The application attempts to access one of the dbspaces.
  • The database server finds that one of the dbspaces is unavailable.

If the database server finds that both dbspace1 and dbspace5 are unavailable, it skips both dbspaces.

A database server administrator can use the DEFAULT setting for the SET DATASKIP statement to control the dataskip feature. Suppose that an application developer includes the following statement in an application:
SET DATASKIP DEFAULT

When a query is run subsequent to this SQL statement, the database server checks the value of the configuration parameter DATASKIP. A database server administrator can encourage users to use this setting to specify which dbspaces are to be skipped as soon as the database server administrator becomes aware that one or more dbspaces are unavailable.


Copyright© 2019 HCL Technologies Limited