NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-8
Operations on Catalog Tables
Operations on Catalog Tables
You create a catalog with CREATE CATALOG. You drop a catalog (after dropping all
user-defined collations, indexes, programs, tables, and views that the catalog describes)
with DROP CATALOG.
You can alter the security of an entire catalog with ALTER CATALOG, or alter the
security of the CATALOGS, PROGRAMS, TRANSIDS, or USAGES catalog tables
with ALTER TABLE.
You can find the version of a catalog with GET VERSION and change the version with
UPGRADE CATALOG or DOWNGRADE CATALOG. (To change the version of the
system catalog, use UPGRADE SYSTEM CATALOG or DOWNGRADE SYSTEM
CATALOG.)
SQL automatically updates the contents of catalog tables for you as you execute other
statements that create, drop, or modify objects described in the catalog. (A few fields
that contain statistics are updated only when you issue an UPDATE STATISTICS
command.)
You can also use these statements with catalog tables:
You cannot use other SQL statements on catalog tables. For example, you cannot create
indexes or constraints on catalog tables or drop individual tables within the catalog.
DML: DECLARE CURSOR
FETCH
SELECT
DCL: CONTROL EXECUTOR
CONTROL QUERY
CONTROL TABLE (has no effect)
FREE RESOURCES
LOCK TABLE (not recommended)
DDL: ALTER CATALOG (security only)
ALTER TABLE (security only for only CATALOGS, PROGRAMS, TRANSIDS,
or USAGES tables)
COMMENT
CREATE CATALOG
CREATE VIEW (shorthand views only)
DROP CATALOG
UPDATE STATISTICS
Other: INVOKE
DISPLAY USE OF
VERIFY