NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
A-10
Examples—ALTER COLLATION
ALTER COLLATION requires read and write authority for the collation and for the
catalog in which the collation is registered.
Only one DDL statement can operate on a given SQL object (or partition of an SQL
object) at a time. An error occurs if you attempt to execute an ALTER COLLATION
statement while another process is executing a DDL operation on the same object.
The specific error depends on the DDL operation involved and the phase of the
operation at which the conflict occurs. (See DDL (Data Definition Language)
Statements on page D-19 for more information.)
Special problems of resecuring collations
Restricting access to a collation effectively restricts access to objects that use the
collation. This restriction is similar to restrictions for tables and views, but because
collations are used differently from tables and views, you might want to use less
restrictive security.
The following scenario illustrates the type of problem that can occur if you alter the
security for a collation to make it more restrictive:
1. User A creates a collation available to user B.
2. User B creates a table that uses the collation.
3. User A alters the security of the collation so user B can no longer access it.
4. User B attempts to compile SQL statements that reference user B's own table,
but the compilation fails because user B does not have authority to access the
collation.
Examples—ALTER COLLATION
The following statement renames a collation:
ALTER COLLATION ORDER1 RENAME ORDERA;
The following statement resecures a collation so all users on the node can access it,
but only the generalized owner can write to or purge it:
ALTER COLLATION TRN31 SECURE "AOOO";