SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-67
Syntax Description of CREATE SCHEMA
Enter an auth-id as a simple name, for example, "sql.user1". Because of
the “.” , you must enclose the user name in double quotes, the same as for a
delimited identifier.
You cannot specify PUBLIC as the auth-id, because a schema can have only
one owner.
LOCATION subvolume
optionally specifies the designated subvolume name for the schema. Ordinarily,
NonStop SQL/MX generates a subvolume name for the schema. However, in some
instances, you might need to specify the subvolume, such as when creating an
RDF backup database. In this case, the subvolume name for each backup schema
must match the subvolume name for the corresponding schema in the primary
database, and you must use the REPEAT USE ALLOWED clause for the
statement to succeed.
In either case, the schema subvolume is written to the
SCHEMATA.SCHEMA_SUBVOLUME column in the SQL/MX system schema. The
schema subvolume is used as the subvolume for the locations of all objects
created within that schema.
If the optional subvolume name is omitted, NonStop SQL/MX generates a
subvolume name for the schema.
Follow these guidelines when using SQL/MX subvolume names:
The name must begin with the letters ZSD, followed by a letter, not a digit (for
example, ZSDa, not ZSD2).
The name must be exactly eight characters long.
All Guardian files representing data in a particular schema must have the same
subvolume name regardless of the volume on which they reside. This
subvolume name must match the subvolume name indicated in the system
schema column SCHEMATA.SCHEMA_SUBVOLUME.
For RDF database creation, if you explicitly specify the subvolume that is
already in use by the primary database, use the REPEAT USE ALLOWED
clause to avoid receiving an error when executing the statement.
Valid SQL/MX subvolume names are:
ZSDBMM3K
ZSDADMM8
REPEAT USE ALLOWED
indicates that NonStop SQL/MX should allow subvolume names to be reused. If
the subvolume name is in use, the schema will be created anyway and you will
receive a warning.
If you omit this clause, the subvolume name you enter must not be in use by any
other schema. If the subvolume name has been used for another schema, you will
receive an error.