SQL/MP Installation and Management Guide

Querying SQL/MP Catalogs
HP NonStop SQL/MP Installation and Management Guide523353-004
6-15
Displaying Catalog, Object, and Program Versions
Displaying Catalog, Object, and Program
Versions
The different product version updates (PVUs) of SQL/MP produce and support
different versions of SQL catalogs, objects, and programs, as discussed in detail in the
SQL/MP Version Management Guide. Because the behavior and capabilities of a
catalog or object depend on its version, you must be able to determine the version of
catalogs or objects that your applications or interactive queries reference. The catalog
tables contain version information, which you can display, but you can also use a GET
VERSION statement to retrieve this information for you as follows:
>> GET VERSION OF TABLE $VOL1.PERSNL.EMPLOYEE;
VERSION: 310
--- SQL operation complete.
To retrieve information about any of the three types of program versions (PCV, PFV,
and HOSV), use the GET VERSION OF PROGRAM statement. When inquiring about
an OSS file, specify the ZYQ name of the OSS file.
The VERSIONS catalog table provides version information about the catalog. You can
use the GET VERSION statement to get this information for you as follows:
>> GET VERSION OF CATALOG $VOL1.$DATA1.PERSNL.VERSIONS;
VERSION: 310
--- SQL operation complete.
This information is also replicated for each catalog in the CATALOGS table in the
system catalog. The catalog format version is located in the CATALOGFORMAT
column, and the catalog version is located in the CATALOGVERSION column:
>> SELECT CATALOGFORMAT, CATALOGVERSION FROM catalog-
name.VERSIONS;
You can also obtain version information from the system catalog CATALOGS table,
which contains the version of each catalog on the node, as shown:
>> SELECT CATALOGNAME, SUBSYSTEMNAME, VERSION
+> FROM sys-cat-volume.SQL.CATALOGS
+> WHERE CATALOGNAME = "\SYS1.$DATA1.PERSNL";
CATALOGNAME SUBSYSTEMNAME VERSION
----------------------- ----------------- -------
\SYS1.$DATA1.PERSNL SQL A310
--- 1 row(s) selected.