Neoview SQL Reference Manual (R2.5)

Replicating Statistics
Histogram statistics for objects in a schema can be replicated with the COPY STATISTICS option.
All the relevant histogram statistics for the objects in the specified schema will be collected on
the source system, copied to the target system, and then inserted into the histogram tables on
the target system. Existing statistics on the target system will be deleted before inserting the
source statistics.
Get Status Command
The GET STATUS command returns the status and details of a replicate operation. This shows
the format of status messages:
SrcObject: Name of the source object
TgtObject: Name of the target object
ObjType: TABLE or INDEX
SrcSystem: Replicated from this system
TgtSystem: Replicated to this system
NumPartns: Number of source partitions
StartTime: Time when the operation started
EndTime: Time when the operation ended
ElapsedTime: Elapsed time
TotalBlocks: Number of blocks to be replicated
BlocksReplicated: Number of replicated blocks
PercentDone: Percentage replicated
Status: INITIATED, IN_PROGRESS, COMPLETED,
ABORTED or FAILED
Semantic Actions
A REPLICATE command can be issued from any interface from which an SQL query can
be issued, such as NCI, SQL Whiteboard in HPDM, JDBC, or ODBC.
The specified table and all dependent user-created indexes will be replicated.
The source table will be locked for read-only access during replication. No
INSERT/UPDATE/DELETE or DDL operations are allowed on the source during replication.
You can perform multiple replicate operations on the same table simultaneously, as long as
the target systems are different.
The target table is taken offline during replication (that is, no operations can occur on the
target table during replication).
The DDL of the target table will be validated to be the same as the source table. Validation
includes the base table objects as well as dependent indexes. All dependent target indexes
must have same name as the source indexes.
A table can be replicated to multiple systems at the same time.
RECOVER is used for cleanup only on the target system and occurs at the schema and table
level, for example:
REPLICATE SOURCE SCHEMA myschema, TARGET SYSTEM \wma0101, RECOVER;
REPLICATE SOURCE TABLE mytab, TARGET SYSTEM \wma0101, RECOVER;
REPLICATE and Views
When a view is part of the schema being replicated, COPY DDL attempts to create the view on
the target system. If the view references tables in a schema that has not been replicated, view
creation fails. Tables referenced by the view must exist or the view will not be created.
REPLICATE and SPJs
When you try to replicate a schema, if there are SPJs in the schema, you need to copy the Java
files to the target system before you can run the REPLICATE command. Otherwise, the
REPLICATE command will fail to create the SPJs on the target system. For example:
228 SQL Utilities