RDF/IMP, IMPX, and ZLT System Management Manual
NonStop SQL/MX and RDF
HP NonStop RDF/IMP, IMPX, and ZLT System Management Manual—524388-002
15-3
Creating NonStop SQL/MX Primary and Backup
Databases from Scratch
If you omit the LOCATION clause, then, after creating the schema, you must use
the following query to obtain the subvolume of the schema (where you fill in the
correct node-name, schema-name, and catalog-name):
SELECT S.schema_subvolume
FROM NONSTOP_SQLMX_node-name.system_schema.schemata S,
NONSTOP_SQLMX_node-name.system_schema.catsys C
WHERE S.schema_name = 'schema-name' AND
C.cat_name = 'catalog-name' AND
S.cat_uid = C.cat_uid;
Note that node-name is a Guardian system name excluding the backslash (\).
In the following example, the node-name is PNODE, the schema-name is SCH,
and the catalog-name is PCAT.
SELECT S.schema_subvolume
FROM NONSTOP_SQLMX_PNODE.system_schema.schemata S,
NONSTOP_SQLMX_PNODE.system_schema.catsys C
WHERE S.schema_name = 'SCH' AND
C.cat_name = 'PCAT' AND
S.cat_uid = C.cat_uid;
For the rest of this procedure assume that the above query returns the value
ZSDXYZ3A.
5. Create the schema on the backup system using the same schema name and the
same subvolume name as on the primary system.
Because RDF is replicating based on the underlying Guardian file locations, you
must use the LOCATION clause. If you specified the LOCATION clause when
creating the primary system's schema, you must use the same subvolume here. If
you did not specify the LOCATION clause when creating the primary system's
schema, you must query the primary system to obtain the Guardian subvolume
name, and you must use the Guardian subvolume name with the LOCATION
clause here.
For example, if issued on the backup system, the following command creates a
schema on the backup system called SCH in catalog BCAT using subvolume
ZSDXYZ3A:
CREATE SCHEMA BCAT.SCH LOCATION ZSDXYZ3A;
6. Create each object (table or index) on the primary system.
The ANSI name of the object must be constructed as follows:
catalog name: use the name of the primary catalog you created in Step 1.
schema name: use the name you used in Steps 4 and 5.
table or index name: whatever ANSI name you choose for the object.