I have a table with SYSTEM_VERSIONING=ON
and trying to create Merge replication and facing issue.
In Microsoft documentation it is mentioned as "Merge replication:Not supported for temporal tables"
https://learn.microsoft.com/en-us/sql/relational-databases/tables/temporal-table-considerations-and-limitations?view=sql-server-ver16
So i tried to create a Merge replication without SYSTEM_VERSIONING
set for the table. After replication was created I have altered the table to system versioning using the following alter query.
ALTER TABLE ReplTable ADD Period for SYSTEM_TIME (ValidFrom,ValidTo)
ALTER TABLE ReplTable SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = dbo.ReplTableHistory, HISTORY_RETENTION_PERIOD = 1 Day));
And created the subscription to replicate data from client. Also replication working successfully.
Is the replication created this way is correct with temporal table?