SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)
3. Determine a name for the sequence generator you want to add.
4. Query the system metadata to ensure the new sequence generator name is unique among
existing sequence generator, table, view, SQL/MP alias, and SPJ names in the schema.
5. Enter the CREATE SEQUENCE statement.
6. Use the GRANT statement to assign the USAGE privilege on the new sequence generator to
authorized users.
7. Revise the application source code as needed to reflect your changes to the database. Process
and compile the updated source file. For more information, see the SQL/MX Programming
Manual for C and COBOL.
For information, see “Creating Sequence Generators” (page 102).
Adding SQL/MP Aliases
Use the CREATE SQLMP ALIAS statement to add an SQL/MP alias to your SQL/MX database.
For more information, see the SQL/MX Reference Manual.
Steps for Adding an SQL/MP Alias
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 SQL/MP alias you want to add.
3. Query the system metadata to ensure the new SQL/MP alias name is unique among existing
table, view, SQL/MP alias, and SPJ names in the schema.
4. Enter the CREATE SQLMP ALIAS statement.
For more information and examples of creating SQL/MP aliases, see the SQL/MX Reference
Manual.
Adding Stored Procedures in Java (SPJs)
Use the CREATE PROCEDURE statement to add an SPJ to your SQL/MX database.
For more information, see the SQL/MX Guide to Stored Procedures in Java.
Adding SQL/MX Tables
Use the CREATE TABLE statement to add a table to your SQL/MX database.
The name for the new table must be unique among names of tables, views, SQL/MP aliases, and
procedures within its schema. You cannot specify a Guardian physical location as the name of
the table, although you can specify the names of the Guardian files that will contain table data by
using the LOCATION clause. For more information, see the “SQL/MX Subvolume Naming
Guidelines” (page 74).
To create a table, you must own its schema or be the super ID. If you add a table containing a
column that corresponds to an existing column in another table, you should define the new table’s
column with the same characteristics as the existing column. To create a constraint on the table
that refers to a column in another table, you must have REFERENCES privileges on that column
and access to the table that contains the column.
NOTE: SQL/MX tables must have a user-defined clustering key to have partitions. You can
partition any table or index provided its clustering key is not just system-generated SYSKEY.
For more information, see the SQL/MX Reference Manual.
160 Adding, Altering, and Dropping SQL/MX Database Objects










