SQL/MP Installation and Management Guide

Querying SQL/MP Catalogs
HP NonStop SQL/MP Installation and Management Guide523353-004
6-3
Displaying Information About Usages by Querying
the Catalog
This example shows the brief format:
Object Name Type S
--------------------------------------- ---- -
0 \SYS1.$VOL.INVENT.SUPPLIER TA
1 \SYS1.$VOL.INVENT.XSUPPNAM IN
2 \SYS1.$VOL.AUSERSV.OPROG2 PG
1 \SYS1.$VOL.AUSERSV.OPROG2 PG *
U = Undefined node N = Node unavailable T = Unsupported type
@ = Node not in list * = Previously displayed ? = System error
Number of unique dependencies : 2
Number of direct dependencies : 1
The DISPLAY USE OF utility does not accept OSS path names as parameters, but
does display OSS programs if they are dependent on the list of requested objects. The
name of an SQL program stored in an OSS file is displayed as its Guardian file name
equivalent and then in its path name format. If there is more than one path name linked
to the program, only one path name is displayed (the first path name available to the
current user). If the OSS path name is not accessible to the user, SQL returns “No path
name is accessible” instead of the path name.
The code for an OSS object is PG (same as for SQL programs stored in Guardian
files).
Displaying Information About Usages by Querying the Catalog
This example displays all dependency information stored in the specified catalog. The
VOLUME command indicates the default volume and designates the subvolume name,
which is also the catalog name, as the default subvolume. This SELECT statement
does not need to include the fully qualified name of the catalog table:
>> VOLUME \SYS1.$VOL1.SALES;
>> SELECT * FROM USAGES;
Displaying Current Database Definitions
You can query the catalog tables to display current database definitions. When
selecting information from the catalog tables, you must either use fully qualified names
or use partially qualified names in conjunction with the LIKE predicate. You must use
uppercase letters for data, but you can use either uppercase or lowercase letters for
column names. Instead of typing all uppercase letters, you can use the UPSHIFT
function or a COLLATE clause that specifies a case-insensitive collation.
For the descriptions of the columns of the catalog tables, see the SQL/MP Reference
Manual.
Note: If you query the catalog tables directly, the results of your query can be affected by the
version level of the catalog, as described under Displaying Catalog, Object, and Program
Versions on page 6-15.