Required settings
- Host name
- Port (default is
1433
) - Service account
- Database name
- CDC enabled for database and tables to replicate
Creating a service account
Creating a service account
Permissions
Permissions
To access change tracking information by using the change tracking functions, the principal must have the following permissions:
SELECT
permission on at least the primary key columns on the change-tracked table to the table that is being queried.VIEW CHANGE TRACKING
permission on the table for which changes are being obtained. The VIEW CHANGE TRACKING permission is required for the following reasons:Change tracking records include information about rows that have been deleted. The records use the primary key values of the rows that have been deleted. A principal could have been granted SELECT permission for a change tracked table after some sensitive data had been deleted. In this case, you wouldn’t want that principal to be able to access that deleted information by using change tracking.Change tracking information can store information about which columns have been changed by update operations. A principal could be denied permission to a column that contains sensitive information. However, because change tracking information is available, a principal can determine that a column value has been updated, but the principal cannot determine the value of the column.ReferenceEnabling Change Tracking
Enabling Change Tracking
In order to enable Change Tracking for SQL Server, you will enable it at the database and table level.
- Enable Change Tracking for your database
- Enable CDC for your tables
Troubleshooting
Change Tracking Auto Cleanup
Change Tracking Auto Cleanup