SQL/MP Installation and Management Guide
Adding, Altering, Removing, and Renaming
Database Objects
HP NonStop SQL/MP Installation and Management Guide—523353-004
7-13
Adding Collations
Adding Collations
Adding collations to a database does not affect existing database dependencies. To
add a collation, use the CREATE COLLATION statement, following these steps:
1. Create the collation source file, as explained under Creating Collations on
page 5-55.
2. 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.
3. Enter the CREATE COLLATION statement, or put the statement text into an EDIT
file and enter an OBEY command to run the statement from the file.
4. Alter the security and ownership of the new collation if necessary.
5. For more information about collations, see Creating Collations on page 5-55.
Adding Comments
Comments are allowed for these objects: a column, table, view, constraint, or index,
table or view column, or collation. To add comments, use the COMMENT statement.
You can add comments to clarify how the object is used. Having comments in the
active data dictionary can help both database administrators and programmers in
understanding the database structure. Application users would not normally use the
dictionary comments.
You can add or append comments to any existing text. If you use the CLEAR clause,
the new comment overwrites any existing comments on the specified object.
To add a comment, follow these steps:
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 object for which you want to add a comment.
3. Determine if any comments exist and whether you want the new comment to be
appended or to overwrite existing comments.
4. Enter the COMMENT statement.
Altering Database Objects
The active data dictionary enables you to make certain changes to the database
online. As with any change to the database, careful planning should be the first step.
To alter the security and physical file attributes of SQL objects, use the ALTER
statement. To alter the security attributes of tables, views, collations, and SQL
programs stored in Guardian files, use the SECURE utility. To alter the security
attributes of SQL programs stored in OSS files, use the appropriate OSS utility. For
more information, see the Open System Services Shell and Utilities Reference Manual.