The store keyword can be used in the Create active STANDBY pair, alter active STANDBY pair, create REPLICATION, and alter REPLICATION to set the properties of the copy, such as timeout, voltage Indentation, commit behavior, table definition Check, return service, and for classic replication, you can also set table-level data conflicts
Set timeout for return service
The default timeout is 10 seconds and can be timed out with a return WAIT time, for example:
RETURNWAITTIME25;
Of course, the same effect can be achieved with Ttrepsyncset in the application:
CALL ttRepSyncSet (0x01251);
Restores the timeout to the default:
CALL ttRepSyncSet(NULL45NULL);
The following is an example of a two-way replication in classic copy:
create REPLICATION bidirectelement a DATASTORE MASTER Databasea Span class= "Hljs-keyword" >on "system1" subscriber databaseb on return Twosafeelement b DATASTORE MASTER databaseb on "system2" subscriber Databasea on "system1" return twosafestore databasea return wait time 30 STORE Databaseb return wait time 30 ;
DISABLE RETURN
DISABLE return setting stops the return service when the copied error reaches a certain threshold
Command>PAIR>SETRETURNALL10;
RESUME RETURN
When the time from commit to acknowledge is less than the value set by the resume return (milliseconds), return service is restored, for example:
Command>PAIR > master1, > master2 >RETURN>>RETURNALL5>RETURN8;
RETURN SERVICES {on | OFF} When [REPLICATION] STOPPED
When replication stops, the setting is to keep the return service open or close the return service.
In any case, it will not affect the synchronization of the data after the communication is resumed.
Durable COMMIT
In general, after the return service is disable return, you can set durable commit to ensure that the data is not lost. For example:
Command>PAIR > master1, > master2 >RETURN>>RETURNALL5>ON>RETURN8;
LOCAL COMMIT ACTION
Valid only for Twosafe, can be set to the default NO action or local commit: Commit
To copy a column definition for a table
The column definitions of the tables participating in the replication may not need to be fully consistent, referring to the order of the columns, the physical definitions can be inconsistent (by ALTER TABLE to increase the column to a consistent definition), but the column name, column data type, key definitions must be consistent.
If the table DEFINITION checking is set to exact, it must be exactly the same; if set to relax, it can be inconsistent.
Exact has a better performance than relax and is the default setting.
Not very useful, skip.
Copy compression
Only the data stream emitted by the database specified in the store is compressed, for example:
CREATE ACTIVE STANDBY PAIR dsn1 on "Host1", DSN2 on "Host2" subscriber D Sn3 on ' host3 ' STORE dsn1 on ' host1 ' COMPRESS traffic on; CREATE ACTIVE STANDBY PAIR dsn1 on "Host1", DSN2 on "Host2" subscriber D Sn3 on ' host3 'STORE dsn1 on ' host1 ' COMPRESS traffic on STORE dsn2 on "Host2" COMPRESS traffic on;
Port settings
Use the port setting to listen for the updated ports that are coming from each other, which is dynamically assigned by default.
Setting the wait timeout from the remote replication agent
The default timeout is 120 seconds. Recommended use. Skip Over
Setting the transaction log error threshold value
The default is 0, which means there is no limit.
You can establish a threshold value is, when exceeded, sets an unavailable database to the failed state before the avail Able transaction log space is exhausted
It appears to be related to log space
Use less, skip over
Configure the Network
The demand for network bandwidth is related to the frequency and volume of data updates.
Transactions is sent between replicated databases in batches. A batch is created whenever there are no more data in the transaction log buffer in the master database, or when the Curren T batch is roughly-KB.
This is supposed to be an asynchronous pattern.
TCP/IP protocol used for replication
In replication, you must specify a host name, and the operating system translates the hostname to 1 or more IP addresses.
When specifying the host is a database in a replication element, you should always use the name returned by the hostname command, as replication uses the same host name to verify the current host was involved in the replication scheme. Replication schemes May is created that does not include the current host.
If the host has multiple network interfaces, the route can be used to specify the interface for replication. Specify by IP address
Set up different network ports, one for load balancing, and two for error switching.
The following is an example of error switching, which can be used as the priority 2 interface of a backup when a pair of interfaces to the 1 fails:
CREATE ACTIVE STANDBY PAIR dns1, dns2ROUTE MASTER dsn1 ON "host1" SUBSCRIBER dsn2 ON "host2" MASTERIP "192.168.1.100" PRIORITY 1 MASTERIP "192.168.1.101" PRIORITY 2 SUBSCRIBERIP "192.168.1.200" PRIORITY 1 SUBSCRIBERIP "192.168.1.201" PRIORITY 2;
TimesTen Database Replication learning: 6. Use the Store keyword to set properties for replication network transport