Neoview SQL Reference Manual (R2.5)
REPLICATE SOURCE SCHEMA <schema>, target system \node;
• This command copies statistics:
REPLICATE SOURCE SCHEMA <schema>, target system \node, copy statistics;
Single-Table Replication
Single table replication replicates data and dependent indexes. Dependent objects, such as views,
materialized views, synonyms, and privileges are not replicated. To get the data from materialized
views, you must perform the REFRESH command on the target table.
When replicating a single table, use the SOURCE TABLE src, TARGET SYSTEM ... command.
The physical data layout of the source and target tables must match. This means that the target
table must exist. If the target table does not already exist, you will need to create the target table.
Because no COPY DDL option exists for a single table, the REPLICATE command will not create
the target table. In addition, the source and target tables must have the same number of physical
partitions. If the source and target tables do not contain the same number of physical partitions,
contact your HP support representative for assistance.
DDL must exist for both source and target tables for the REPLICATE command to move data.
Replicating From a Larger System to a Smaller System
One useful capability of this feature is the ability to replicate a table when the target table contains
a different number of partitions than the source table. The source and target systems do not need
to have the same number of disk volumes, however, both source and target tables must have the
same number of partitions. In moving to a smaller system, this means that multiple partitions
will be created on the same disk volume and replicate will be done from each source partition
to each target partition. If you use the COPY DDL option to replicate the schema, the target table
will be automatically created with the same number of partitions as the source.
An implicit transform step is done after the replicate phase to convert the target table to conform
to the target system configuration. The default is to always transform the table. This step also
reduces the number of partitions on the target system. You need to have enough space for two
copies of the target table on the target system. After a table is replicated, space for the interim
target table is deallocated. If an error occurs during replication of any table, the interim table is
deallocated, an error is returned for that particular table, and replicate moves to the next table.The
implicit transform step can be avoided by using the NO TRANSFORM TARGET option. This
means that the target table will have the same number of partitions as the source table.
As an example, consider a source system with 32 partitions and a target system of 16 partitions.
Using the NO TRANSFORM TARGET option on the REPLICATE command, the target system
will have 32 partitions.
Replicating From a Smaller System to a Larger System
You may need to replicate a smaller system to a larger system. For example, you may want to
replicate a smaller system used for business testing to a larger production system. Another
scenario includes migrating when upgrading to a larger system.
As an example, consider a source system with 16 partitions and a target system of 32 partitions.
Using the NO TRANSFORM TARGET option on the REPLICATE command, the target system
will have 16 partitions. If the source and target number of partitions naturally matches, due to
replication between identically configured systems, there is no need to specify the NO
TRANSFORM option.
Replicating Multiple Tables
Multiple tables are replicated sequentially one at a time.
REPLICATE Command 227