Backup and Restore 2 Manual
BRCOM BACKUP Command
Backup and Restore 2 Manual—522696-019
6-35
PARTONLY Job Option
PARTONLY Job Option
This job option backs up individual tables or index partitions. OFF is the default.
OFF
disallows the back up of individual table or index partitions.
ON
backs up the table or index partitions that are explicitly specified for each of the
tables or indices selected for backup. Table or index partitions that are not explicitly
specified are not backed up.
Guidelines
You must be extremely cautious if restoring only some partitions as it can cause an
inconsistent database.
If you explicitly specify any index partitions or table partitions, you must specify
PARTONLY ON.
PARTONLY { OFF | ON }
Caution. Under normal conditions, to ensure that the BACKUP and RESTORE commands
handle all related objects together and avoid inconsistencies, use BACKUP with the default
options PARTONLY OFF and INDEXES INCLUDED.
When necessary, use PARTONLY and INDEXES EXCLUDED to back up or restore individual
SQL components of a set of related objects (files), such as the individual table partitions. Use
these job 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 job 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 job 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.