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-4
Designating Wild Cards in SQL/MX Schema Names
Designating Wild Cards in SQL/MX Schema Names
An SQL/MX schema has a designated subvolume in which every partition belonging to
that schema must reside. Therefore, in general, a Guardian wild card of the form
$*.subvolume.* can serve as convenient shorthand for every Guardian file in the
SQL/MX schemas whose schema subvolume is subvolume.
For more information about the CREATE SCHEMA statement, see the SQL/MX
Reference Manual.
Using the LOCATION Clause
Both CREATE TABLE and CREATE INDEX include a LOCATION clause for specifying
the physical locations of partitions. The complete syntax for this LOCATION clause is:
LOCATION [\node.]$volume[.subvolume.file-name]
[NAME partition-name]
where subvolume is the name of the designated schema subvolume for the schema
in which the table or index is being created, and file-name is a Guardian file name
that conforms to the rules specified in SQL/MX Subvolume Naming Guidelines on
page 7-2. Otherwise, an error is generated.
When you create SQL/MX tables and indexes, you would typically use the LOCATION
clause to partition data on particular volumes, without regard to the Guardian
subvolume and file name assigned to these partitions. However, it might be necessary
to re-create a file with the exact same Guardian names that it was given when first
created.
You cannot use the LOCATION clause to specify a subvolume that is already in use by
another schema.
For more information about using the LOCATION clause, see the SQL/MX Reference
Manual.
Using the Subvolume Option in the CREATE SCHEMA Statement
The CREATE SCHEMA statement accepts an optional subvolume name, a
nonstandard HP extension. This option enables you to create an RDF backup
database. The subvolume name of each backup schema must match the subvolume
Note. If you do not specify a subvolume name for a schema’s partitions when you
create a schema, NonStop SQL/MX provides a unique subvolume name by default. In
doing this, NonStop SQL/MX establishes and maintains a one-to-one correspondence
between schemas and subvolumes, which is desirable when you use subvolume wild
cards. Unless you have a compelling reason for specifying your own subvolume
names, you should allow NonStop SQL/MX to choose them for you. Otherwise, it is
your responsibility to preserve this one-to-one correspondence. In addition, all files in a
schema subvolume are SQL/MX files. The DP2 process does not allow other types of
files to be created in a schema subvolume.