SQL/MX 2.x Installation and Management Guide (H06.04+)

Reorganizing SQL/MX Tables and Maintaining Data
HP NonStop SQL/MX Installation and Management Guide540436-001
10-36
Examples of Using DUP to Copy Tables
The catalog that defines the source table or tables can exist on a remote node and
be referenced by the current DUP operation if the remote node is visible to the
local node. The target table can also exist in a catalog and structure that reside on
a visible remote node. Finally, the Guardian files associated with the source and
target tables can exist on remote nodes if those nodes are visible from the local
node. For more information about node visibility in a distributed environment, see
Section 13, Managing an SQL/MX Distributed Database.
DUP does not check disk space before running the request. You must confirm that
enough disk space is available before running the DUP request. Check the EOF
field of FILE INFO or FUP INFO to identify the size of each partition and determine
whether there is sufficient disk space for the partitions.
DUP displays errors if the source table or target table and its dependent indexes
cannot be accessed or if the load fails in response to a resource or file system
problem.
If the DUP operation fails because the DUP process does fails unexpectedly, use
the RECOVER command to complete or roll back the operation. If the DUP
operation fails after all the data has been successfully copied to the target objects,
specify RECOVER with the RESUME option to complete the DUP operation. If the
DUP operation fails before the data is successfully copied, specify RECOVER with
the CANCEL option to roll back the DUP operation. You can access this status
information by reading the DDL_LOCK metadata table. If you specify the wrong
RECOVER operation, RECOVER reports this so that you can use the correct
operation, possibly with RECOVER...CANCEL. For more information about the
RECOVER command, see the SQL/MX Reference Manual.
During the DUP operation, the target table is marked as corrupt to prevent another
process from viewing the data until the operation completes successfully.
All utility operations have the potential to run for hours, especially those that
involve a great deal of data movement. To manage systems effectively, you need
to know how far the operation has proceeded and how much longer it needs to run.
Utilities provide reports that indicate what step is in progress. Utility operations
periodically place operation progress reports in the metadata tables through the
DDL lock mechanism. You can examine metadata to get the latest information.
The DUP operation has the option to log these progress reports to an OSS text file.
See Section 8, Querying SQL/MX Metadata for instructions on how to access
information from the DDL_LOCKS table.
For more information about DDL lock considerations for the DUP utility, see the
SQL/MX Reference Manual.
Examples of Using DUP to Copy Tables
This example copies the partitions of the source table (using a different catalog and
schema) to the same locations:
DUP mycat.myschema.mytable1 TO mycat1.myschema1.*;