SQL/MP Installation and Management Guide

Adding, Altering, Removing, and Renaming
Database Objects
HP NonStop SQL/MP Installation and Management Guide523353-004
7-17
Altering Table Attributes
Steps for Altering Table Attributes
1. Start an SQLCI session. Enter a LOG command to initiate a log file for the
statements and commands entered in this session. Keep the log for your records.
2. Determine the name of the table you want to alter.
3. If you are altering security or the audit attribute, determine whether the change will
affect current users or programs.
4. Enter the ALTER TABLE statement.
For more information about table columns and attributes, see Creating Base Tables on
page 5-10.
Altering Security
To make the USAGES, TRANSIDS, and PROGRAMS tables accessible for SQL
compilations of programs, you might need to change the security of each table in an
ALTER TABLE statement. During explicit SQL compilation, any dependencies a
program has on tables or views described in a catalog are recorded in the catalog’s
USAGES table. To insert the dependency record into the USAGES table, the catalog
manager must start a TMF transaction that is registered in the TRANSIDS table. Write
access to the PROGRAMS table is required so that the SQL compiler can register
programs in the table.
You can change the catalog security at creation time by specifying the SECURE
attribute in the CREATE CATALOG statement. You can also change the security of
these individual tables at any later time by using the ALTER CATALOG statement:
CATALOGS (system catalog only)
USAGES
TRANSIDS
PROGRAMS
If you use the SECURE attribute, you must specify a security string that gives the
owner of the catalog tables read access.
For a user to compile a program, the user needs read and write access to the
USAGES and TRANSIDS tables in a catalog containing descriptions of tables, views,
collations, partitions, and indexes that the program uses. Additionally required is write
access to the PROGRAMS table of the catalog in which the program is registered.
The catalog tables compose the data dictionary, a vital part of an application’s integrity.
The security of a catalog should protect the data dictionary information from
unauthorized removal or alteration.