solidDB Help : solidDB reference : SQL: Statements : START REPLICATION
  
START REPLICATION
START REPLICATION {SUBSCRIPTION subs‑nameFROM CONNECTION conn‑name | ALL}
   [LOAD ONLY [SYNC] | LOAD FORCE [SYNC] | NO LOAD]
Access requirements
SYS_REPLICATION_ROLE role
Usage
Use the START REPLICATION statement to start replication either from a named subscription, from all subscriptions that use a certain connection, or from all subscriptions in the target database.
When a subscription is started, the replication first checks the last log position that was processed by the subscription before it connects to the subscription source and tries to start online replication with given position. If that is not possible, the replication subsystem automatically starts data reload for the subscription. After the load is completed, it restarts online replication. Load is done according to the load rules given for the subscription.
After the subscription is started, the subscription changes state. The replication subscription status can be checked with the DESCRIBE REPLICATION SUBSCRIPTION statement, see DESCRIBE REPLICATION. If successful, the load resets the replication current position, and the next online replication START statement starts from that position.
Note The replication process is asynchronous. The replication subscription status could change at any time, for example, the START REPLICATION statement could return success, but then the subscription might stop and fail if it has lost source connection, for example.
START REPLICATION (and STOP REPLICATION) statements are non-transactional. All the replication processes execute their own transactions, which run separately from the transaction that executes the START REPLICATION statement. Rolling back a transaction that executes a START REPLICATION statement does not affect replication.
You can attempt to start a subscription that is already started; replication does not treat this as an error. When you start multiple subscriptions with one statement, all the subscriptions are started independently. If some of the subscriptions fail to start, this does not necessarily affect the starting of other subscriptions.
Parameters, clauses, keywords, and variables
Statement targets:
SUBSCRIPTION: Start the specified replication subscription.
FROM CONNECTION: Start every replication subscription that uses the specified connection.
ALL: Start every replication subscription in the current node.
Load options:
LOAD ONLY: Data can be loaded from the source database without starting replication.
LOAD FORCE: Runs the subscription load even if catchup is possible. In this case, the subscription load is run in LOAD TRUNCATE mode regardless of the load mode that was specified for the subscription when it was created.
NO LOAD: Prevents the replication subscription from starting if catchup is not possible.
SYNC: Use with LOAD FORCE or LOAD ONLY to run the statement synchronously; the statement does not return status until the load completes or fails (in the latter case, an error is returned). If you do not include SYNC, the statement starts the load and returns immediately, without waiting for the load to complete.
Result set
The START REPLICATION statement result set includes the subscription name, current log position, subscription current status, and last error code and error message.
If the START REPLICATION statement starts multiple subscriptions, the result set contains multiple rows.
solsql> START REPLICATION SUBSCRIPTION basic_1;
SUBSCRIPTION_NAME LOG_POSITION STATUS ERROR_CODE ERROR_MESSAGE
----------------- ------------ - ------ ---------- -------------
BASIC_1 0000000000000021FFFFFFFF00000000000002440000000000000244 STARTING NULL NULL
1 rows fetched.

solsql> START REPLICATION SUBSCRIPTION sub1;
RESULT
------
SUBSCRIPTION_NAME LOG_POSITION STATUS ERROR_CODE ERROR_MESSAGE
================== ========================================== ================== ========== ==================
'SUB1' 'NULL 'NULL 26027 'SOLID FEC Error 26027: Cannot read partition ''PART1'' definition '

1 rows fetched.
Return values
 
Error code
Description
26006
Failed to load replication subscriptions
26011
Source has the same UUID as the target
26017
Could not find subscription
26018
Cannot interpret subscription configuration information
Examples
START REPLICATION ALL -- start to replicate from every subscription in this node
START REPLICATION ALL LOAD ONLY -- load all data from every subscription in this node but do not start replication
START REPLICATION SUBSCRIPTION FROM CONNECTION conn1 -- start to replicate from every subscription using connection 'conn1' in this node
Go up to
SQL: Statements