SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)
>> MODIFY TABLE cat3.sch3.ordersh add partition
+> location $DATA04;
--- SQL operation complete.
In response to this command, a portion of the data in each of the original three partitions is moved
automatically to the fourth partition, rebalancing the data evenly across the four partitions.
For more detailed examples of adding, modifying, and deleting range-partitioned and
hash-partitioned tables and indexes, see “Using MODIFY to Manage Table and Index Partitions”
(page 184).
Adding Schemas
To add a schema to a catalog, use the CREATE SCHEMA statement. If you specify an optional
subvolume name in the CREATE SCHEMA statement, follow these guidelines:
• 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 SCHEMA_SUBVOLUME, described
in the system schema table SCHEMATA.
NonStop SQL/MX prevents you from specifying a subvolume name that is already in use by another
schema. However, when the RDF product is used to maintain a duplicate database on another
node, you must use the same subvolume for the backup database. If the catalogs are visible on
the other nodes, use the REPEAT USE ALLOWED option while creating the schema.
Schema names that being with DEFINITION_SCHEMA_VERSION_ are reserved (in all catalogs)
for system metadata. You cannot create schemas with these names in user catalogs.
For more information, see the SQL/MX Reference Manual.
Steps for Adding a Schema
1. Start an MXCI session. Enter a LOG command to initiate a log file for statements and commands
entered in this session. Keep the log for your records.
2. Determine a name for the schema you want to add.
3. Query the system metadata to ensure the new schema name is unique among existing schema
names in the catalog.
4. Enter the CREATE SCHEMA statement,.
For more information, see “Creating Schemas” (page 78).
Adding Sequence Generators
Use the CREATE SEQUENCE statement to add a sequence generator to your SQL/MX database.
To create a sequence generator, you must be the schema owner or the super ID.
A sequence generator name must be unique among the names of sequence generators, tables,
views, SQL/MP aliases, and procedures within the schema. You cannot specify a Guardian physical
location as the name of the sequence generator, although you can specify the name of the Guardian
files that contain sequence data by using the LOCATION clause. For more information, see the
“SQL/MX Subvolume Naming Guidelines” (page 74).
Steps for Adding a Sequence Generator
1. Plan the sequence generator characteristics such as data-type, location, start-with value,
minvalue, maxvalue, increment-by value, and cycle.
2. Start an MXCI session. Enter a LOG command to initiate a log file for statements and commands
entered in this session. Keep the log for your records.
Adding Objects to an SQL/MX Database 159










