solidDB Help : solidDB reference : SQL: Statements : EXPORT SUBSCRIPTION TO REPLICA
  
EXPORT SUBSCRIPTION TO REPLICA
Note Applies to only solidDB Advanced Replication configurations.
EXPORT SUBSCRIPTION publication‑name [(publication‑parameters)]
   
TO REPLICA replica‑node‑name
   USING BOOKMARK bookmark‑name
   [COMMITBLOCK number‑of‑rows]Usage
Use the EXPORT SUBSCRIPTION TO REPLICA statement to export a large volume of data (that is specified by a publication) from the master database to a replica database. After the EXPORT operation has completed, the replica database can use the MESSAGE APPEND REFRESH statement to refresh the data of the subscription in an incremental manner, see MESSAGE APPEND.
The EXPORT SUBSCRIPTION TO REPLICA statement is not available in a replica database.
The EXPORT SUBSCRIPTION TO REPLICA statement is based on a given bookmark, which means that export data is consistent up to this bookmark. When you export data, the EXPORT SUBSCRIPTION statement includes all rows as in a full publication up to the bookmark. However, since export is based on a given bookmark, the subsequent REFRESHes are incremental.
If a bookmark is created in a master database for the purpose of exporting data, then the bookmark must exist when the EXPORT SUBSCRIPTION statement is executed on the master database.
Parameters, clauses, keywords, and variables
COMMIT BLOCK: Specifies how many rows of the exported data are committed in the replica database in a single transaction.
When a large number of rows are to be exported, using a commit block improves the performance of the operation. However, it is recommended that the replica database is not used by other applications if the COMMIT BLOCK clause is used.
Return values
 
Error code
Description
25056
Autocommit not allowed
25067
Bookmark is not found.
25010
Publication name not found.
Example
EXPORT SUBSCRIPTION FINANCE_PUBLICATION(2004) TO REPLICA
   replica_1
USING BOOKMARK BOOKMARK_FOR_FINANCE_DB COMMITBLOCK 10000;
Go up to
SQL: Statements