SQL/MP Installation and Management Guide

Adding, Altering, Removing, and Renaming
Database Objects
HP NonStop SQL/MP Installation and Management Guide523353-004
7-28
Altering Comments
If you alter the security of a collation, be careful not to restrict access for dependent
objects and programs. Altering collation security also alters the security of all objects
and programs that use the collation.
This example changes the security of a collation to allow all network users access to
the collation:
>> ALTER COLLATION $VOL1.SALES.SPANISH
+> SECURE “NU-U”;
--- SQL operation complete.
For more information about collation attributes, see Creating Collations on page 5-55.
Altering Comments
The COMMENT statement can add a comment to existing comments for an object or
replace existing comments with a new one.
You can use the CLEAR clause to clear the existing comments and add a new
comment to the object. If you do not use the CLEAR clause, the comment is added as
a new row in the COMMENTS catalog table after any existing comments for the object.
Dropping Objects From a Database
The active data dictionary provides the mechanism to drop objects easily from the
database as the application requirements change. When an object other than a
collation is dropped, SQL/MP ensures the integrity of the database by dropping or
invalidating associated dependent objects. This effect on other objects must be
carefully reviewed before any object is dropped.
To ensure that collations are not dropped when other objects or SQL programs still
need to use them, SQL does not drop a collation that has any dependent objects or
programs.
SQL provides the DROP statement and the PURGE utility to delete objects from the
data dictionary. The DROP statement operates on a specified object, deletes the
catalog definitions, and purges the physical file, if any. The PURGE utility provides the
same capability, but the utility enables you to identify objects with file-set lists.
To logically remove specific objects from your database, use the DROP statement; you
must use DROP to remove catalogs or constraints. If you need to remove groups of
objects as file sets, however, using the PURGE utility is the fastest way.
Both DROP and PURGE require authority to purge the object and any dependent
objects. Write authority is required for the catalogs in which the objects are described.
For details on authorization requirements, see the SQL/MP Reference Manual.
Note. To delete an SQL program stored in an OSS file, use the appropriate OSS utility to
delete the pathname. The file is purged when the last link to the file is removed. For more
information, see the Open System Services Shell and Utilities Reference Manual.