DB2 Version 9.7 for Linux, UNIX, and Windows

SNAPSHOT_RANGES table function

Read syntax diagramSkip visual syntax diagram
>>-SNAPSHOT_RANGES--(--dbname--,--dbpartitionnum--)------------><

The schema is SYSPROC.

The SNAPSHOT_RANGES function returns information from a range snapshot.

Table function parameters

dbname
An input argument of type VARCHAR(255) that specifies a valid database name in the same instance as the currently connected database when calling this function. Specify a database name that has a directory entry type of either "Indirect" or "Home", as returned by the LIST DATABASE DIRECTORY command. Specify the null value to take the snapshot from the currently connected database.
dbpartitionnum
An input argument of type INTEGER that specifies a valid database partition number. Specify -1 for the current database partition, or -2 for all active database partitions. An active database partition is a partition where the database is available for connection and use by applications.

If the null value is specified, -1 is set implicitly.

Authorization

One of the following authorities is required to execute the function:
  • EXECUTE privilege on the function
  • DATAACCESS authority
To access snapshot monitor data, one of the following authorities is required:
  • SYSMON authority
  • SYSCTRL authority
  • SYSMAINT authority
  • SYSADM authority

The function returns a table as shown in the following section.

Table 1. Information returned by the SNAPSHOT_RANGES table function
Column name Data type Description or corresponding monitor element
SNAPSHOT_TIMESTAMP TIMESTAMP snapshot_timestamp - Snapshot timestamp
TABLESPACE_ID BIGINT tablespace_id - Table space identification
TABLESPACE_NAME VARCHAR(128) tablespace_name - Table space name
RANGE_NUMBER BIGINT range_number - Range number
RANGE_STRIPE_SET_NUMBER BIGINT range_stripe_set_number - Stripe set number
RANGE_OFFSET BIGINT range_offset - Range offset
RANGE_MAX_PAGE BIGINT range_max_page_number - Maximum page in range
RANGE_MAX_EXTENT BIGINT range_max_extent - Maximum extent in range
RANGE_START_STRIPE BIGINT range_start_stripe - Start stripe
RANGE_END_STRIPE BIGINT range_end_stripe - End stripe
RANGE_ADJUSTMENT BIGINT range_adjustment - Range adjustment
RANGE_NUM_CONTAINER BIGINT range_num_containers - Number of containers in range
RANGE_CONTAINER_ID BIGINT range_container_id - Range container