RDF System Management Manual for J-series and H-series RVUs (RDF 1.10)

Described below is a set of steps that can be used to synchronize individual partitions of NonStop
SQL/MP tables (either primary or secondary partitions).
NOTE: While the discussion below is concerned with NonStop SQL/MP, the same issues and
resolutions apply for NonStop SQL/MX.
Requirements for Synchronization of Individual Partitions
To synchronize an individual partition of a partitioned table, you must have a copy of the entire
table on the backup system. If you are missing a volume because of a complete media failure and
you do not have a backup copy of the table on tape or in an online dump, then you will have to
resynchronize the entire table. Therefore, to prevent this, you should have a copy of your backup
database on tape or in an online dump. The preferred method is to have on online dump because
it can be used both for fast synchronization after a media failure on the backup system as well as
being able to takeover on the backup system as quickly as possible after your lose your primary
system due to an unplanned outage. If you choose not to take online dumps, then you should have
a copy of all tables on your backup system on tape. The data in the copy on tape need not be
current, but you need to have the physical structure of all tables on tape to facilitate the ability to
resynchronize individual partitions at a later date. To this end, you can employ the following special
trick, but it will not work if you need to resynchronize an individual partition of a partitioned index.
With an online dump, however, you can recover an individual partition of an index.
Quick Trick for Having a Copy on Tape
1. Rename the table to a temporary name using the SQLCI ALTER TABLE command.
2. Create a duplicate table with the original name of the table you renamed in step 1. This table
must have all the same partitions as the original table.
3. Use BACKUP to put the duplicate table on tape. It will have all the partitions, but they are
empty. Thus, it will not take long to back the partitions up, nor will it take long to restore any
of the partitions.
4. Rename the table to a temporary name and then drop it. By renaming it before dropping it,
you preserve any indexes that are associated with the original table name.
5. Rename the temporary table (step 1) back to the original table name.
Thus, you now have on tape empty partitions for the entire table. Should you ever lose a volume
to a complete media failure, you can install a new disk and then use the RESTORE utility with the
PARTONLY option to recover the missing partition. Because you have backed up a table with the
name you need on the backup system, you can restore any partition that you need to with the
PARTONLY option and without having to use the MAP NAMES option. Once you have restored
the empty partition, you can use the protocol described below to synchronize the affected partition.
With this trick, however, you cannot recover from a media failure that wipes out an individual
partition of a partitioned index. If that occurs, you will need to drop the index from the associated
table, thereby eliminating all other partitions of the index. Then you must create a new index.
Key-Sequenced Tables
The most effective means of describing this method is to use an example. Suppose you have a
table named PART whose primary partition is named $DATA.TEST.PART, that this table has 50
secondary partitions, and you only need to synchronize the primary partition. The following set of
steps presumes you have just added back the volume needing synchronization to the RDF
configuration and you are running with update off.
Again, follow the steps for complete database synchronization, although with some specific
modifications. The complete set of steps with modifications are listed below.
1. If RDF is currently running, issue a STOP RDF command on the primary system.
2. Purge the RDF control subvolume and then issue an INITIALIZE RDF command of the following
form on the primary system:
INITIALIZE RDF, BACKUPSYSTEM \system, SYNCHDBTIME ddmmmyyyy hh:mm
170 Online Database Synchronization