NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-6
Considerations—CATALOG
Considerations—CATALOG
Whenever the default catalog is empty, SQL uses the default subvolume for the
default catalog.
Effect on prepared statements
Unless a CONTROL QUERY BIND NAMES AT EXECUTION directive is in
effect when a PREPARE executes, a prepared statement uses the node, volume, and
catalog defaults in effect at the time of the PREPARE and is not affected by a
change in the default catalog. See CONTROL QUERY Directive
on page C-70 or
Name Resolution on page N-2 for more information.
Effect on DEFINEs
CATALOG alters the CATALOG attribute of the =_DEFAULTS DEFINE. Changing
the CATALOG attribute with ALTER DEFINE =_DEFAULTS has exactly the same
effect as issuing a CATALOG command.
Examples—CATALOG
CATALOG \SYS1.$VOL1.PERSNL;
CATALOG INVENT;
Catalogs
A NonStop SQL/MP catalog is a set of tables and indexes that describe SQL objects.
Tables in the set are called catalog tables and SQL creates them—along with their
indexes—when you execute a CREATE CATALOG statement.
Each NonStop SQL/MP catalog (the set of catalog tables and their indexes) resides on
its own Guardian subvolume, and the name of that subvolume is also the name of the
catalog. The name has the same form as the subvolume portion of a Guardian file name:
[\node.][$volume.]subvol
For example, \SYS1.$VOL1.SALES might be the fully qualified name of a catalog with
the simple name SALES. If you omit \node or $volume, SQL uses the current default
node and volume to expand the catalog name. (See Guardian Names
on page G-7 if you
need more information about Guardian names.)
Each node on which NonStop SQL/MP is used has one special catalog called the system
catalog (described under System Catalog
on page S-91) and might have many other
catalogs. Each table, view, index, partition, collation, or catalog table located on a node
must be described in a catalog on the same node. Normally, a SQL program is registered
in a catalog, too (enabling SQL to locate affected programs when you change definitions
of tables, views, indexes, or collations), but you can create unregistered programs if
necessary.
A volume can have many catalogs. A subvolume can have only one catalog. Each
catalog can describe objects from any subvolume and volume on the same node.