SQL Server 2008 change tracking and primary keys
-
29-06-2021 - |
Question
I needed to set change tracking
in sql server 2008
table to true but it gave an error that the table has to have a primary key
- Is there a way to enable change tracking without setting a
primary key
in my table - Is it a good programming practice not to set
primary keys
? I am creating a system but i don't want to set them onSQL
tables
Solution
The Table must have primary key in order to enable Change tracking
Having primary keys on a table infarct is a good programming practice.
OTHER TIPS
You can enable Change Tracking on a table which has Primary key. It is must. Because Change Tracking works based on Primary key in a table.
You can find some more additional information from my Article http://www.codeproject.com/Articles/537649/SQL-Server-Change-Tracking-CT#_comments
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow