SQLB_TBSPQRY_DATA data structure
This structure is used to return table space data to an application program.
Field Name | Data Type | Description |
---|---|---|
TBSPQVER | CHAR(8) | Structure version identifier. |
ID | INTEGER | Internal identifier for the table space. |
NAMELEN | INTEGER | Length of the table space name. |
NAME | CHAR(128) | Null-terminated name of the table space. |
TOTALPAGES | INTEGER | Number of pages specified by CREATE TABLESPACE (DMS only). |
USEABLEPAGES | INTEGER | TOTALPAGES minus overhead (DMS only). This value is rounded down to the next multiple of 4KB. |
FLAGS | INTEGER | Bit attributes for the table space. |
PAGESIZE | INTEGER | Page size (in bytes) of the table space. Currently fixed at 4KB. |
EXTSIZE | INTEGER | Extent size (in pages) of the table space. |
PREFETCHSIZE | INTEGER | Prefetch size. |
NCONTAINERS | INTEGER | Number of containers in the table space. |
TBSSTATE | INTEGER | Table space states. |
LIFELSN | INTEGER (64-BIT) | Time stamp identifying the origin of the table space. |
FLAGS2 | INTEGER | Bit attributes for the table space. |
MINIMUMRECTIME | CHAR(27) | Earliest point in time that may be specified by point-in-time table space rollforward. |
STATECHNGOBJ | INTEGER | If TBSSTATE is SQLB_LOAD_PENDING or SQLB_DELETE_PENDING, the object ID in table space STATECHANGEID that caused the table space state to be set. Otherwise zero. |
STATECHNGID | INTEGER | If TBSSTATE is SQLB_LOAD_PENDING or SQLB_DELETE_PENDING, the table space ID of the object STATECHANGEOBJ that caused the table space state to be set. Otherwise zero. |
NQUIESCERS | INTEGER | If TBSSTATE is SQLB_QUIESCED_SHARE, UPDATE, or EXCLUSIVE, the number of quiescers of the table space and the number of entries in QUIESCERS. |
QUIESCER | Array of SQLB_QUIESCER_DATA structures | Each array entry consists of the quiesce data for a quiesced object. |
FSCACHING | UNSIGNED CHAR | File system caching policy to support Direct I/O. This is a 31-bit field. |
RESERVED | CHAR(31) | Reserved for future use. |
Possible values for FLAGS (defined in sqlutil) are:
- SQLB_TBS_SMS
- System Managed Space
- SQLB_TBS_DMS
- Database Managed Space
- SQLB_TBS_ANY
- All types of permanent data. Regular table space.
- SQLB_TBS_LONG
- All types of permanent data. Large table space.
- SQLB_TBS_SYSTMP
- System temporary data.
- SQLB_TBS_USRTMP
- User temporary data.
Possible values for TBSSTATE (defined in sqlutil) are:
- SQLB_NORMAL
- Normal
- SQLB_QUIESCED_SHARE
- Quiesced: SHARE
- SQLB_QUIESCED_UPDATE
- Quiesced: UPDATE
- SQLB_QUIESCED_EXCLUSIVE
- Quiesced: EXCLUSIVE
- SQLB_LOAD_PENDING
- Load pending
- SQLB_DELETE_PENDING
- Delete pending
- SQLB_BACKUP_PENDING
- Backup pending
- SQLB_ROLLFORWARD_IN_PROGRESS
- Roll forward in progress
- SQLB_ROLLFORWARD_PENDING
- Roll forward pending
- SQLB_RESTORE_PENDING
- Restore pending
- SQLB_DISABLE_PENDING
- Disable pending
- SQLB_REORG_IN_PROGRESS
- Reorganization in progress
- SQLB_BACKUP_IN_PROGRESS
- Backup in progress
- SQLB_STORDEF_PENDING
- Storage must be defined
- SQLB_RESTORE_IN_PROGRESS
- Restore in progress
- SQLB_STORDEF_ALLOWED
- Storage may be defined
- SQLB_STORDEF_FINAL_VERSION
- Storage definition is in 'final' state
- SQLB_STORDEF_CHANGED
- Storage definition was changed before a roll forward
- SQLB_REBAL_IN_PROGRESS
- DMS rebalancer is active
- SQLB_PSTAT_DELETION
- Table space deletion in progress
- SQLB_PSTAT_CREATION
- Table space creation in progress.
Possible values for FLAGS2 (defined in sqlutil) are:
- SQLB_STATE_SET
- For service use only.
API and data structure syntax
SQL_STRUCTURE SQLB_TBSPQRY_DATA
{
char tbspqver[SQLB_SVERSION_SIZE];
sqluint32 id;
sqluint32 nameLen;
char name[SQLB_MAX_TBS_NAME_SZ];
sqluint32 totalPages;
sqluint32 useablePages;
sqluint32 flags;
sqluint32 pageSize;
sqluint32 extSize;
sqluint32 prefetchSize;
sqluint32 nContainers;
sqluint32 tbsState;
sqluint64 lifeLSN;
sqluint32 flags2;
char minimumRecTime[SQL_STAMP_STRLEN+1];
char pad1[1];
sqluint32 StateChngObj;
sqluint32 StateChngID;
sqluint32 nQuiescers;
struct SQLB_QUIESCER_DATA quiescer[SQLB_MAX_QUIESCERS];
unsigned char fsCaching;
char reserved[31];
};
SQL_STRUCTURE SQLB_QUIESCER_DATA
{
sqluint32 quiesceId;
sqluint32 quiesceObject;
};
SQLB_QUIESCER_DATA data structure parameters
- pad
- Reserved. Used for structure alignment and should not be populated by user data.
- pad1
- Reserved. Used for structure alignment and should not be populated by user data.
- quiesceId
- Input. ID of the table space that the quiesced object was created in.
- quiesceObject
- Input. Object ID of the quiesced object.
COBOL Structure
* File: sqlutbsp.cbl
01 SQLB-TBSPQRY-DATA.
05 SQL-TBSPQVER PIC X(8).
05 SQL-ID PIC 9(9) COMP-5.
05 SQL-NAME-LEN PIC 9(9) COMP-5.
05 SQL-NAME PIC X(128).
05 SQL-TOTAL-PAGES PIC 9(9) COMP-5.
05 SQL-USEABLE-PAGES PIC 9(9) COMP-5.
05 SQL-FLAGS PIC 9(9) COMP-5.
05 SQL-PAGE-SIZE PIC 9(9) COMP-5.
05 SQL-EXT-SIZE PIC 9(9) COMP-5.
05 SQL-PREFETCH-SIZE PIC 9(9) COMP-5.
05 SQL-N-CONTAINERS PIC 9(9) COMP-5.
05 SQL-TBS-STATE PIC 9(9) COMP-5.
05 SQL-LIFE-LSN PIC 9(18) COMP-5.
05 SQL-FLAGS2 PIC 9(9) COMP-5.
05 SQL-MINIMUM-REC-TIME PIC X(26).
05 FILLER PIC X.
05 SQL-PAD1 PIC X(1).
05 SQL-STATE-CHNG-OBJ PIC 9(9) COMP-5.
05 SQL-STATE-CHNG-ID PIC 9(9) COMP-5.
05 SQL-N-QUIESCERS PIC 9(9) COMP-5.
05 SQL-QUIESCER OCCURS 5 TIMES.
10 SQL-QUIESCE-ID PIC 9(9) COMP-5.
10 SQL-QUIESCE-OBJECT PIC 9(9) COMP-5.
05 SQL-FSCACHING PIC X(1).
05 SQL-RESERVED PIC X(31).
*