Virtual cluster mirror table function is based on the concept of virtual cluster more VC based on function, mainly used in between the two VC to virtual cluster table set up the mirror of relationship, thus the user to write a list of data (DDL, DML, LOAD) can real-time synchronization to mirror the corresponding relationship between the other table,
This function requires respectively belong to two different VC table has the same name and the name of the table, just can have mirror image relationship, and delete existing mirror relationship, that the main table and mirror table are available
The virtual cluster mirror function provides three ways to create table mirror, respectively is:
1. Create a single table mirror;
For example, to an existing table creation mirror table, use the following command:
The ALTER TABLE's VC1. DB. T1 CREATE MIRROR TO VC2;
2. To the library to create tables for the unit image;
For example: the mirror to all tables to create the DataBase table, use the following command:
The ALTER DATABASE's VC1. DB CREATE MIRROR TO VC2;
3. At the same time to create the main table and mirror table,
For example: there are two ways to create the main table and mirror at the same time table, the command is as follows:
Increase in the CREATE TABLE statement method 1 is a MIRROR TO parameters TO realize the image at the same time TO CREATE the main TABLE and TABLE,
CREATE TABLE's VC1. DB. T1 (INT, B VARCHAR (10)) MIRROR TO VC2;
Method 2 is first set's VC1. DB library default image value, and then in's VC1. DB library create table of default will create the main table and mirror at the same time table,
The ALTER DATABASE's VC1. DB SET DEFAULT MIRROR=VC2;
CREATE TABLE's VC1. DB. T1 (INT, B VARCHAR (10));