SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)

Planning Database Security and Recovery
HP NonStop SQL/MX Installation and Management Guide523723-004
5-24
Using Backup and Restore 2 to Create Offline RDF
Backup Databases
Each source-filename specified is restored to the exact dest-filename to
which it is mapped. The main purpose of this option is to restore a database with
the exact same file names as the source database. Use this option if you are using
RESTORE to create an RDF backup database in which every partition of the
source object must be explicitly mapped to its correct destination. The destination
file names must conform to the SQL/MX Guardian file naming conventions, or the
RESTORE operation fails. If you omit the node name, the name of the local node
is always used.
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,
)
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 on page 5-24.
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).
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.