SQL/MX 3.2 Management Manual (H06.25+, J06.14+)

Table Of Contents
Source files not explicitly mapped with the LOCATION clause will have their destination location
generated by the system, using the default volumes and internally generated file names, as for any
newly created table.
Creating an RDF Backup Database With Identical File Names
Suppose that an SQL/MX table has these source locations:
\NODE1.$DATA01.ZSDABCDEF.FILEX100
\NODE1.$DATA02.ZSDABCDEF.FILEX100
\NODE1.$DATA03.ZSDABCDEF.FILEX100
Suppose that the desired RDF primary-to-backup volume mappings are:
\NODE1.$DATA01 ==> \NODE2.$DATA0A
\NODE1.$DATA02 ==> \NODE2.$DATA0B
\NODE1.$DATA03 ==> \NODE2.$DATA0C
When restoring the files, the necessary LOCATION clause would look like this:
LOCATION (
\NODE1.$DATA01.ZSDABCDEF.FILEX100 TO
\NODE2.$DATA0A.ZSDABCDEF.FILEX100,
\NODE1.$DATA02.ZSDABCDEF.FILEX100 TO
\NODE2.$DATA0B.ZSDABCDEF.FILEX100,
\NODE1.$DATA03.ZSDABCDEF.FILEX100 TO
\NODE2.$DATA0C.ZSDABCDEF.FILEX100,
)
NOTE: Do not specify logical partition names in the LOCATION clause. The RESTORE operation
always preserves the logical partition name of each source location as the logical partition name
of the target location. These names are not necessary for short-term RDF support, but make a variety
of ANSI name-based operations more convenient in the future.
Creating an Online Backup Database
To create the backup database with the primary database online:
1. Create the backup catalog and schema as described in “Creating an RDF Backup Database
With Identical File Names” (page 58).
2. Using the REGISTER CATALOG command, set up catalog references for both the primary and
backup catalogs so that both catalogs are visible from both nodes (which is why they need
different names).
3. Create DDL scripts for all replicated database objects. Use the LOCATION clause to specify
the Guardian file names, making sure that they are the same on the backup system as the
primary system. Change the primary catalog name to the backup catalog name for each table
created. Alternately, the catalog name can be removed, and a default catalog name can be
used.
4. Execute the DDL statements in the specified order to create the backup database.
Populating an Online Backup Database
For each table, execute statements of the form:
INSERT INTO backup table SELECT * FROM primary table
NOTE: The INSERT...SELECT statement refers to a table in the backup and primary catalog.
58 Planning Database Security and Recovery