Backup and Restore 2 Manual
BRCOM RESTORE Command
Backup and Restore 2 Manual—522696-019
7-48
PARTONLY Job Option
PARTONLY Job Option
Use this job option to specify which table partitions are to be restored. This option
applies to SQL/MX objects. OFF is the default.
ON
restores only the partitions explicitly specified for each of the tables selected to be
restored. Partitions that are not specified explicitly are not restored.
OFF
does not allow individual table partitions to be restored.
Guidelines
You must be extremely cautious when restoring only some partitions as it can
cause an inconsistent database.
If the target tables has indexes defined and restore of only table partitions is
performed without the indexes, the indexes and tables will lose synchronization,
PARTONLY { OFF | ON }
Caution. Under normal conditions, to ensure that the BACKUP and RESTORE commands
handle all related objects together and avoid inconsistencies, use the BACKUP command with
the default options PARTONLY OFF and INDEXES INCLUDED.
When necessary, use the PARTONLY and INDEXES EXCLUDED options to back up or restore
individual SQL components of a set of related objects (files), such as the individual table
partitions. Use these options carefully:
The consistency checking that the BACKUP or RESTORE commands perform to validate
the data during these procedures does not ensure the data consistency of SQL objects.
If you use options from BACKUP and RESTORE commands incorrectly, you can cause
the primary data to be inconsistent with the alternate indexes. For example, if you specify
PARTONLY ON or INDEXES INCLUDED, a base table can become inconsistent with its
indexes and left invalid after a RESTORE process. Use these options with extreme care.
Considerations for IDENTITY column table:
Use the following steps when PARTONLY job option is explicitly used to restore partition data:
If the target table has an IDENTITY column defined as GENERATED ALWAYS AS
IDENTITY, ensure that backed up source table has the same IDENTITY column attributes
as that of the target table.This is required to provide data consistency.
If the target table has an IDENTITY column that is defined as GENERATED BY DEFAULT
AS IDENTITY, one can use the ALTER TABLE ALTER COLUMN...RECALIBRATE
functionality to influence the next value for the IDENTITY column. For more information,
see SQL/MX Reference Manual for Release 3.1.