SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)
Querying SQL/MX Metadata
HP NonStop SQL/MX Installation and Management Guide—523723-004
8-45
Displaying Attributes of a Partition
the MXCI SHOWLABEL command with the DETAIL option to display a list of partitions
for a table or an index. For examples of the SHOWDDL and SHOWLABEL commands,
see the SQL/MX Reference Manual.
Displaying Attributes of a Partition
This example displays attributes for the partitions for the table
SAMDBCAT.SALES.CUSTOMER. To display additional fields, select different fields
from the PARTITIONS table:
>> set schema samdbcat.definition_schema_version_1200;
--- SQL operation complete.
>> select p.data_source,
p_max_ext,
substring(p.first_key, 1, 10) as first_key,
case p.partition_status
when 'AV' then 'AVAILABLE'
when 'UO' then 'OFFLINE'
when 'UC' then 'CORRUPT'
when 'UD' then 'DROPPED'
when 'UR' then 'RECREATED'
end as status
from partitions p, objects o
where
o.object_name_space = 'TA' and
o.object_name = 'CUSTOMER' and
o.object_uid = p.object_uid and
o.schema_uid =
(select schema_uid
from nonstop_sqlmx_figaro.system_schema.schemata
where
schema_name = 'SALES' and
cat_uid =
(select cat_uid
from nonstop_sqlmx_figaro.system_schema.catsys
where cat_name = 'SAMDBCAT'
)
)
for read uncommitted access;
DATA_SOURCE MAX_EXT FIRST_KEY STATUS
----------- -------------------- ---------- ---------
$DATA08 160 AVAILABLE
$DATA09 160 3000 AVAILABLE