Advanced Replication Guide : Updating and maintaining the schema of a distributed system : Managing solidDB® tables and databases : Managing data with synchronization bookmarks
  
Managing data with synchronization bookmarks
A synchronization bookmark is a state of the solidDB® database that you define for future reference purposes. Bookmarks are created with the following command in the master database:
CREATE SYNC BOOKMARK bookmark_name
This command automatically associates other attributes such as creator of the bookmark, create date and time, and unique bookmark ID.
Bookmarks are more than placeholders in the database. In a sense, a bookmark can be thought of as a user-defined persistent snapshot of a database. They are used also to export data from the master and import data into a replica. For more information, see Exporting and importing subscriptions.
Bookmarks are created only in the master database. You cannot create a bookmark in a replica database. Attempting to do this results in an error. Note that 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.
Bookmarks retain history information for all tables that have history versions defined. For this reason, it is recommended that bookmarks be dropped when they are no longer needed. Otherwise, disk space usage increases considerably to accommodate the extra history versions.
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
Bookmarks are dropped with the following command in the master database:
DROP SYNC BOOKMARK bookmark_name
bookmark_name
::= literal
Note Bookmarks should only be dropped after the exported data is imported into all intended replicas, not just one. After the import, the replicas need to refresh the imported subscription once before the bookmark may be dropped in the master. Drop a bookmark only when you no longer have any replicas to import.
After using a bookmark to successfully import a file to a replica or to receive the first refresh of the data from the master database, it is recommended that you drop the bookmark that you used to export the data to a file. For details on importing and exporting subscriptions, see the following section.
If a bookmark remains, then all subsequent changes to data on the master including deletes and updates are tracked on the master database for each bookmark to facilitate incremental refreshes.
By dropping a bookmark, you allow the server to delete 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. This may result in performance degradation.
For more details, see the description of the SQL command DROP SYNC BOOKMARK in the solidDB® SQL Guide.
See also
Managing solidDB® tables and databases