SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)
Creating an SQL/MX Database
HP NonStop SQL/MX Installation and Management Guide—523723-004
7-5
Correcting File Name Problems
name of the corresponding primary schema. If you are not creating an RDF backup of
the database, you should omit the optional subvolume, in which case NonStop
SQL/MX generates a new and unique subvolume name for the schema. In all cases,
the schema subvolume name is written to the SCHEMA_SUBVOLUME column of the
system schema table
NONSTOP_SQLMX_system-name.SYSTEM_SCHEMA.SCHEMATA.
The format of the CREATE SCHEMA statement is:
CREATE SCHEMA schema-clause [schema-element]
where schema-clause is one of:
•
schema
•
schema AUTHORIZATION auth-id
•
schema AUTHORIZATION auth-id LOCATION subvolume
•
schema LOCATION subvolume
where schema-element is one of:
•
table-definition
•
view-definition
•
grant-statement
•
index-definition
The subvolume name must conform to the rules for schema subvolumes described in
SQL/MX Subvolume Naming Guidelines on page 7-2. Otherwise, an error is
generated.
This example creates a schema with a subvolume name of ZSDABCDE:
CREATE SCHEMA sch2 AUTHORIZATION jsmith LOCATION ZSDABCDE;
This example creates a schema with a subvolume name of ZSDSCHEM:
CREATE SCHEMA myschema LOCATION ZSDSCHEM;
For more information about the CREATE SCHEMA statement, see the SQL/MX
Reference Manual.
Correcting File Name Problems
When a table or index is created with precise file names, there is a possibility that a file
already exists with the same name as one of the partitions to be created. Typically, the
solution is to move the partition that already exists. Use the MODIFY utility to specify a
name for the partition to be moved. This file can exist on the same volume as the
original, or on a different volume.
Note. NonStop SQL/MX does not prevent you from specifying a subvolume name that is
already in use by another schema. If you do, a Guardian wild card of the form
\system.$*.subvolume.* will include physical files from all schemas using the subvolume
name.