DB2 Version 9.7 for Linux, UNIX, and Windows

SNAPSHOT_TBS_CFG table function

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

The schema is SYSPROC.

The SNAPSHOT_TBS_CFG function returns configuration information from a table space 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.

If both parameters are set to NULL, the snapshot is taken only if a file has not previously been created by the SNAPSHOT_FILEW stored procedure for the corresponding snapshot API request type.

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_TBS_CFG 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
TABLESPACE_TYPE SMALLINT tablespace_type - Table space type
TABLESPACE_STATE BIGINT tablespace_state - Table space state
NUM_QUIESCERS BIGINT tablespace_num_quiescers - Number of quiescers
STATE_CHANGE_OBJ_ID BIGINT tablespace_state_change_object_id - State change object identification
STATE_CHANGE_TBS_ID BIGINT tablespace_state_change_ts_id - State change table space identification
MIN_RECOVERY_TIME TIMESTAMP tablespace_min_recovery_time - Minimum recovery time for rollforward
TBS_CONTENTS_TYPE SMALLINT tablespace_content_type - Table space content type
BUFFERPOOL_ID BIGINT tablespace_cur_pool_id - Buffer pool currently being used
NEXT_BUFFERPOOL_ID BIGINT tablespace_next_pool_id - Buffer pool that will be used at next startup
PAGE_SIZE BIGINT tablespace_page_size - Table space page size
EXTENT_SIZE BIGINT tablespace_extent_size - Table space extent size
PREFETCH_SIZE BIGINT tablespace_prefetch_size - Table space prefetch size
TOTAL_PAGES BIGINT tablespace_total_pages - Total pages in table space
USABLE_PAGES BIGINT tablespace_usable_pages - Usable pages in table space
USED_PAGES BIGINT tablespace_used_pages - Used pages in table space
FREE_PAGES BIGINT tablespace_free_pages - Free pages in table space
PENDING_FREE_PAGES BIGINT tablespace_pending_free_pages - Pending free pages in table space
HIGH_WATER_MARK BIGINT pool_watermark - Memory pool watermark
REBALANCER_MODE BIGINT tablespace_rebalancer_mode - Rebalancer mode

REBALANCER_EXTENTS_
   REMAINING

BIGINT tablespace_rebalancer_extents_remaining - Total number of extents to be processed by the rebalancer

REBALANCER_EXTENTS_
   PROCESSED

BIGINT tablespace_rebalancer_extents_processed - Number of extents the rebalancer has processed
REBALANCER_PRIORITY BIGINT tablespace_rebalancer_priority - Current rebalancer priority

REBALANCER_START_
   TIME

TIMESTAMP tablespace_rebalancer_start_time - Rebalancer start time

REBALANCER_RESTART_
   TIME

TIMESTAMP tablespace_rebalancer_restart_time - Rebalancer restart time
LAST_EXTENT_MOVED BIGINT tablespace_rebalancer_last_extent_moved - Last extent moved by the rebalancer
NUM_RANGES BIGINT tablespace_num_ranges - Number of ranges in the table space map
NUM_CONTAINERS BIGINT tablespace_num_containers - Number of containers in table space