RDF System Management Manual

Table Of Contents
NonStop SQL/MX and RDF
HP NonStop RDF System Management Manual524388-003
15-4
Creating NonStop SQL/MX Primary and Backup
Databases from Scratch
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.
For example, the following command creates a table called TAB1 in schema
PCAT.SCH, with three partitions, located on volumes $DATA02, $DATA03,
$DATA04, respectively.
CREATE TABLE PCAT.SCH.TAB1 (a int not null, b int, primary key (a))
LOCATION $DATA02
PARTITION ( ADD FIRST KEY (100) LOCATION $DATA03,
ADD FIRST KEY (200) LOCATION $DATA04 );
You should specify only the desired volume to allow NonStop SQL/MX to generate
the complete Guardian filenames. This is true for non-partitioned objects as well as
for partitioned objects. Thus, you specify only the volume name in the LOCATION
clause, and NonStop SQL/MX constructs the fully qualified Guardian name for the
object, using:
The volume you specified for the object in the LOCATION clause.
The subvolume associated with the object's ANSI schema (as indicated in that
portion of the object's ANSI name).
The system-generated Guardian filename. In this case, you must obtain the
underlying Guardian filename using SHOWDDL or a metadata query before
you can set up your backup database.