Neoview SQL Reference Manual (R2.5)

object definitions, you can replicate the data for these objects. For additional information,
see “Replicating an Entire Schema” (page 226).
If the PURGEDATA TARGET option is specified with the COPY DDL clause, target
objects will be dropped before replicating the source object definitions.
The COPY STATISTICS option will replicate statistics for all objects in the schema to the
target system. Existing statistics in the target schema will be deleted before the replication.
target-option
PURGEDATA TARGET removes all data in the target table before replication and is off
by default. If the target is not empty and the PURGEDATA TARGET option is not
specified, an error will be returned.
If NO TRANSFORM TARGET is specified, objects will not be transformed to conform
to the hardware configuration of the target system.
control-options
The query ID can be used to specify the replicate command for which a control option
is given.
GET STATUS returns the status of the specified replicate command.
ABORT cancels a running replicate command.
If a table is inaccessible or has a DDL lock on it (this can occur if the process doing the
replication dies or some other system error occurs), the RECOVER option will recover
the source and target tables.
source-filter
You can specify a filter to include or exclude the tables in the specified schema. Use the LIKE
filter to filter out names similar to the SQL LIKE predicate.
Considerations for REPLICATE
Data replication synchronously returns status information as each object is replicated. Control
returns to the caller only after the replicate operation is complete.
Before you use the REPLICATE command, HP Support configures the Neoview systems so that
they will participate in REPLICATE.
Each replicate operation is tracked by a unique query ID. The query ID has the same format as
the query ID stored in the repository for other SQL queries. If a table has multiple indexes, the
table and the index replication will have a distinct and unique query ID. This ensures that each
replicate operation can be tracked and controlled separately.
At the start of a replicate operation, the query ID of the command will be returned. This query
ID can be used later to get the status of a running, aborted, or completed replicate operation. At
the end of replication, details of the replication operation will be returned.
The target table must exist before you use the REPLICATE command. If the DDL for the target
table does not match the source table, the REPLICATE fails. HP suggests that you use the COPY
DDL option to create the target DDL and the dependent objects. A sample sequence of commands
is REPLICATE ... COPY DDL, followed by REPLICATE table.
Replicating an Entire Schema
When an entire schema is replicated, all the tables and dependent objects, including indexes,
views, privileges, materialized views, and synonyms, are replicated as well. Mvgroups are not
replicated. Statistics must be replicated in a separate command.
This command copies the DDL for the entire schema:
REPLICATE SOURCE SCHEMA <schema>, target system \node, copy ddl;
This command copies all the data from the source objects to target objects:
226 SQL Utilities