The MON_GET_TABLESPACE_QUIESCER table function returns information about quiesced table spaces. A single row is returned for each member.
None
Column name | Data type | Description |
---|---|---|
TBSP_NAME | VARCHAR(128) | tablespace_name - Table space name monitor element |
QUIESCER_TS_ID | BIGINT | quiescer_ts_id - Quiescer table space identification monitor element |
QUIESCER_OBJ_ID | BIGINT | quiescer_obj_id - Quiescer object identification monitor element |
QUIESCER_AUTH_ID | VARCHAR(128) | quiescer_auth_id - Quiescer user authorization identification monitor element |
QUIESCER_APPLICATION_HANDLE | BIGINT | quiescer_application_handle - Quiescer application handle monitor element |
QUIESCER_STATE | VARCHAR(14) | quiescer_state - Quiescer state monitor element |
DBPARTITIONNUM | SMALLINT | dbpartitionnum - Database partition number monitor element |
MEMBER | SMALLINT | member - Database member monitor element |
Use the MON_GET_TABLESPACE_QUIESCER table function in place of the SNAP_GET_TBSP_QUIESCER table function and SNAPTBSP_QUIESCER view, which have been deprecated.
SELECT SUBSTR(TBSP_NAME, 1, 10) AS TBSP_NAME, QUIESCER_TS_ID,
QUIESCER_OBJ_ID, QUIESCER_AUTH_ID, QUIESCER_APPLICATION_HANDLE,
QUIESCER_STATE, DBPARTITIONNUM
FROM TABLE(MON_GET_TABLESPACE_QUIESCER(-2)) ORDER BY DBPARTITIONNUM
Sample
output from this query is as follows: TBSP_NAME QUIESCER_TS_ID QUIESCER_OBJ_ID QUIESCER_AUTH_ID ...
---------- --------------- ---------------- ----------------- ...
USERSPACE1 2 5 SWALKTY ...
USERSPACE1 2 5 SWALKTY ...
2 record(s) selected.
Output from this query (continued):... QUIESCER_APPLICATION_HANDLE QUIESCER_STATE DBPARTITIONNUM
... --------------------------- -------------- --------------
... 0 EXCLUSIVE 0
... 65983 EXCLUSIVE 1
SELECT SUBSTR(TBSP_NAME, 1, 10) AS TBSP_NAME, QUIESCER_TS_ID,
QUIESCER_OBJ_ID, QUIESCER_AUTH_ID, QUIESCER_APPLICATION_HANDLE,
QUIESCER_STATE, DBPARTITIONNUM
FROM TABLE( MON_GET_TABLESPACE_QUIESCER(1)) AS T
The
following is sample output from this query:TBSP_NAME QUIESCER_TS_ID QUIESCER_OBJ_ID QUIESCER_AUTH_ID ...
---------- --------------- ---------------- ----------------- ...
USERSPACE1 2 5 SWALKTY ...
1 record(s) selected.
Output from this query (continued):... QUIESCER_APPLICATION_HANDLE QUIESCER_STATE DBPARTITIONNUM
... --------------------------- -------------- --------------
... 65983 EXCLUSIVE 1
SELECT SUBSTR(TBSP_NAME, 1, 10) AS TBSP_NAME,
CASE WHEN QUIESCER_TS_ID = 65530
THEN QUIESCER_TS_ID - 65536
ELSE QUIESCER_TS_ID END as tbspaceid,
CASE WHEN QUIESCER_TS_ID = 65530
THEN QUIESCER_OBJ_ID - 65536
ELSE QUIESCER_OBJ_ID END as tableid
FROM TABLE(MON_GET_TABLESPACE_QUIESCER(-2))
ORDER BY DBPARTITIONNUM
Sample output from this query
is as follows:TBSP_NAME TBSPACEID TABLEID
------------- ------------ --------
TABDATA -6 -32768
DATAMART -6 -32765
SMALL 5 17
3 record(s) selected.
Use the given TBSPACEID and TABLEID
provided in the output from the previous query to find the table schema
and name from SYSCAT.TABLES:SELECT CHAR(tabschema, 10)tabschema, CHAR(tabname,15)tabname
FROM SYSCAT.TABLES
WHERE tbspaceid = -6 AND tableid in (-32768,-32765)
Sample
output from this query is as follows:TABSCHEMA TABNAME
------------ --------
SAMP ORDERS_RP
SAMP ORDERS_DMART
2 record(s) selected.
SELECT CHAR(tabschema, 10)tabschema, CHAR(tabname,15)tabname
FROM SYSCAT.TABLES
WHERE tbspaceid = 5 AND tableid = 17
Sample output from
this query is as follows:TABSCHEMA TABNAME
------------ --------
SAMP NATION
1 record(s) selected.