Examples Of Replicate - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

A failed replicate operation on any partition will cause the REPLICATE command to abort.
Restart after any failure will not be supported. A failed REPLICATE operation will purge
data from all target partitions. You will need to reissue the REPLICATE command to replicate
again.
An aborted REPLICATE command also purges data from all target partitions.
Schema DDL (COPY DDL) and statistics (COPY STATISTICS) replication can only be done
for all objects in the specified schema. LIKE pattern or include/exclude IN lists cannot be
specified.

Examples of REPLICATE

Replicate a single table from source to target:
REPLICATE SOURCE TABLE mysch.t, PURGEDATA TARGET, TARGET SYSTEM \exe0101;
This example replicates table T in schema sch to target system \exe0101 in the same
schema (sch) and with the same table name (T). The target table must exist. All dependent
indexes on table T will also be replicated.
DDL for the target table will be verified to the same as the source DDL. Verification will
include the base table and all dependent indexes. If the source table and indexes do not
match those on the target system, an error will be returned. Data will be compressed before
replication. Data will not be purged prior to replication.
Replicate a single table from source to target with extra options:
REPLICATE SOURCE TABLE sch.t, TARGET SYSTEM \exe0101,
PRIORITY 150, PURGEDATA TARGET, COMPRESS OFF;
This example replicates table T in schema sch to target system \exe0101 in the same
schema (sch) and with the same table name (T). All dependent indexes on table T will also
be replicated. Target DDL will be created before data replication and will include the base
table and all dependent indexes. Data will not be compressed before replication. Data on
the target will be purged prior to replication. Priority of replicate process will be set at 150.
Replicate data for all tables in the IN list:
REPLICATE SOURCE TABLES IN (sch.t1, sch2.2, t3), TARGET SYSTEM \exe0101;
This example replicates tables specified in the IN list and their dependent indexes to target
system \exe0101.
Replicate data for all objects in schema sch:
REPLICATE SOURCE SCHEMA sch, TARGET SYSTEM \exe0101;
Replicate data for all objects in schema sch with LIKE pattern restrictions:
REPLICATE SOURCE SCHEMA sch, SOURCE LIKE 'T%', TARGET SYSTEM \exe0101;
This example replicates all base tables and dependent indexes in source schema sch that
match the pattern 'T%' to target schema sch on target system \exe0101.
Replicate DDL for all objects in schema sch:
REPLICATE SOURCE SCHEMA sch, COPY DDL, TARGET SYSTEM \exe0101;
Replicate statistics for all objects in schema sch:
REPLICATE SOURCE SCHEMA sch, COPY STATISTICS, TARGET SYSTEM \exe0101;
Replicate DDL, data, and statistics for all objects in schema sch. The following commands
run in this order will replicate (1) DDL, (2) data, and (3) statistics from the source to the
target.
REPLICATE SOURCE SCHEMA sch, COPY DDL, TARGET SYSTEM \exe0101;
Copies DDL definition and creates the objects on the target.
REPLICATE SOURCE SCHEMA sch, TARGET SYSTEM \exe0101;
Copies data from the source to the target.
230
SQL Utilities

Advertisement

Table of Contents
loading

Table of Contents