solidDB Help : Replication : Advanced Replication : Maintaining a distributed system : Managing data with synchronization bookmarks
  
Managing data with synchronization bookmarks
A synchronization bookmark represents a user-defined version of the database. It is a persistent snapshot of a solidDB database that provides a reference for performing specific synchronization tasks.
Bookmarks are used typically to export data from a master database (for import into a replica database) by using the EXPORT SUBSCRIPTION statement, see EXPORT SUBSCRIPTION. Exporting and importing data allows you to create a replica from a master more efficiently if you have databases larger than 2 GB.
For more information, see Exporting and importing subscriptions.
Bookmarks are created by using the CREATE SYNC BOOKMARK statement, see CREATE SYNC BOOKMARK. The CREATE SYNC BOOKMARK statement automatically associates other attributes such as the creator of the bookmark, the create date and time, and a unique bookmark ID.
Bookmarks are created only in the master database; you cannot create a bookmark in a replica database. There is no practical limit to the number of bookmarks you can create in a database.
Creating bookmarks requires Database Administrator (DBA) or solidDB Administrator (SYS_SYNC_ADMIN_ROLE) privileges.
Retrieving bookmark information
Before creating a new bookmark or dropping an existing bookmark, you can query the solidDB catalog table SYS_SYNC_BOOKMARKS to see a list of existing bookmarks. For example, the following query gives the bookmark name, creation date, and the creator of the bookmark:
SELECT BM_NAME, BM_VERSION, BM_CREATOR, BM_CREATIME FROM SYS_SYNC_BOOKMARKS;
Administrative privileges are not required to retrieve bookmarks from the system catalog table.
Dropping bookmarks
If a table is set up for synchronization history with the ALTER TABLE ... SET SYNCHISTORY statement (see ALTER TABLE ... SET SYNCHISTORY), a bookmark retains history information for the table. For this reason, use the DROP SYNC BOOKMARK statement, (see DROP SYNC BOOKMARK) to drop bookmarks when they are not longer needed.
If bookmarks are retained then, for each bookmark, all subsequent changes to data in the master database (including deletes and updates) are recorded on the master database.
When you drop a bookmark, the server deletes the history data that was required by the bookmark. If you do not drop bookmarks, more disk space is consumed for each bookmark registered in the master database and this might result in performance degradation.
Bookmarks should only be dropped after the exported data is imported into all intended replica databases. After the import, the replicas must refresh the imported subscription one time before the bookmark can be dropped in the master database. Drop a bookmark only when you no longer have any replica databases to import.
Bookmarks are dropped by executing the DROP SYNC BOOKMARK statement in the master database, see DROP SYNC BOOKMARK.
Go up to
Maintaining a distributed system