solidDB Help : solidDB reference : SQL: Statements : ALTER TABLE : ALTER TABLE ... SET HISTORY COLUMNS
  
ALTER TABLE ... SET HISTORY COLUMNS
Note Applies to only solidDB Advanced Replication configurations.
ALTER TABLE table‑name SET HISTORY COLUMNS (col‑name [, col‑name …])
Access requirements
Database user
Usage
After you set tables for synchronization history, use the ALTER TABLE ... SET HISTORY COLUMNS statement to specify which column updates in the master database and its corresponding synchronized table cause entries to the history table.
In the master database, use SET SYNCHISTORY and SET HISTORY COLUMNS to enable incremental publications on a table.
In the replica database, use SET SYNCHISTORY and SET HISTORY COLUMNS to enable incremental REFRESH on a table.
Note In order for the ALTER TABLE ... SET HISTORY COLUMNS statement to succeed, you must execute the ALTER TABLE ... SET SYNCHISTORY statement first. Executing the ALTER TABLE ... SET NOSYNCHISTORY statement removes the effect of the ALTER TABLE ... SET HISTORY COLUMNS statement.
If you do not use this statement to specify particular columns, then all update operations (on all columns) in the master database cause a new entry to be added to the history table when the corresponding synchronized table is updated. Generally, you should use the ALTER TABLE ... SET HISTORY COLUMNS statement for columns that are used for search criteria or for joining. For more information, see Using SET HISTORY COLUMNS.
Return values
 
Error code
Description
13047
No privilege for operation
13100
Illegal table mode combination
13134
Table is not a base table
25038
Table is referenced in publication publication_name; drop or alter operations are not allowed
25039
Table is referenced in subscription to publication publication_name; drop or alter operations are not allowed.
Examples
ALTER TABLE myLargeTable SET HISTORY COLUMNS (accountid);
Go up to
ALTER TABLE