SQL/MX 3.2 Reference Manual (H06.25+, J06.14+)

MXCI Commands
HP NonStop SQL/MX Release 3.2 Reference Manual691117-001
4-35
GET NAMES OF RELATED SCHEMAS Command
GET NAMES OF RELATED SCHEMAS
Command
The GET NAMES OF RELATED SCHEMAS command displays the names of the
transitive closure of schemas related to the specified schema. Schemas are related if a
view, a trigger, or a constraint in one schema references an object in the other schema.
The specified schema is included in the output.
schema-name
is the ANSI name of the schema for which the list of related schemas is requested.
There is no default for the schema-name. However, the MXCI default catalog
applies.
Error Conditions for GET NAMES OF RELATED SCHEMAS
An error for the GET NAMES OF RELATED SCHEMAS command occurs when:
The catalog of the specified schema is not visible on the local node.
The specified schema does not exist.
The specified schema has no metadata on the local node and the remote node(s),
where an automatic reference for the schema's catalog exists, cannot be
accessed.
A related schema has no metadata on the local node and the remote node(s),
where an automatic reference for the schema's catalog exists, cannot be
accessed.
An invalid schema name is specified.
Example of GET NAMES OF RELATED SCHEMAS
In this example, view CAT.SCH1.V1 references tables CAT.SCH2.T2 and
CAT.SCH3.T3. A referential integrity constraint exists between tables CAT.SCH3.TX
and CAT.SCH4.TY.
>> GET NAMES OF RELATED SCHEMAS FOR CAT.SCH1;
SCHEMAS:CAT.SCH1
CAT.SCH2
CAT.SCH3
CAT.SCH4
GET NAMES OF RELATED SCHEMAS FOR schema-name;