SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)
Creating an SQL/MX Database
HP NonStop SQL/MX Installation and Management Guide—523723-004
7-7
Catalog Naming
•
Cannot contain any other catalogs.
Catalog Naming
The catalog name is an SQL identifier that represents the first part of the three-part
ANSI logical name of the form catalog.schema.name. The catalog’s SQL identifier
must be unique among catalogs on the node.
It is permissible for two nodes (for example, nodes \A and \B) in a distributed SQL/MX
environment to have catalogs with the same name. Each node can access its own
catalog and the objects in it by using location-independent ANSI names. However,
node \A cannot access anything in the same-named catalog on node \B, and vice
versa. For this reason, it may be best to avoid naming a catalog with the same name
used by a catalog on another node. If you intend to register the remote catalog from
either node, do not use the same catalog names.
For more information about catalog naming, see the SQL/MX Reference Manual.
Rules for Creating and Dropping Catalogs
•
Any user on a node can create a catalog on that node.
•
Any user on a node can drop an empty catalog.
•
A nonempty catalog cannot be dropped.
•
In a distributed database environment, only the super ID user and the person who
creates a catalog can register and unregister it. For more information, see
Section 13, Managing an SQL/MX Distributed Database.
Examples for Creating a Catalog
To create a user catalog, enter:
CREATE CATALOG mycat;
To create a user catalog on the local node and use the LOCATION clause to specify
the location of the metadata tables for the catalog, enter:
CREATE CATALOG mycat LOCATION $DATA08;
For more information about the CREATE CATALOG statement, see the SQL/MX
Reference Manual.
Creating Catalogs for Single-Node and Distributed Systems
From NonStop SQL/MX, you must create a catalog on the node where it will reside.
You cannot create catalogs for remote nodes from the local node.
In a distributed database environment, use the REGISTER CATALOG command to
register a catalog from the local node for remote nodes. Remote nodes on which a
catalog has been registered contain information about that catalog in their system