Change tracking is the process of recording changes made to data as they are made.
Questions tagged [change-tracking]
356 questions
5
votes
2 answers
How can I make a c# decimal match a SQL decimal for EF change tracking?
To avoid touching changeless records in EF it's important that original and current entity values match. I am seeing a problem with decimals where the EF entity has SQL representation and that is being compared to c# decimal.
This is debug output…

jwrightmail
- 907
- 1
- 13
- 24
5
votes
1 answer
UIDocument Recover Unsaved Changes On App Crash/Force Quit
From what I understand, the UIDocument class can track unsaved changes to a file and even locks the file so it cannot be checked out by more than one person. But what happens if the user force quits the app without saving or the app crashes? How…

rolling_codes
- 15,174
- 22
- 76
- 112
5
votes
1 answer
How can I change the retention period used by SQL Server change tracking?
I have change tracking enabled on a SQL Server database. I originally configured the database to use auto cleanup with a retention period of 3 days. Now that everything is running I would like to update that retention window to 10 days. How can I do…

BenR
- 11,296
- 3
- 28
- 47
5
votes
3 answers
Enable change tracking on all tables in database
Assuming change tracking is enabled on a SQL Server database, how do I enable change tracking on all the tables in the database?

mozey
- 2,222
- 2
- 27
- 34
5
votes
2 answers
What's the best practice for setting last modified and who modified using NHibernate?
In my application I have a situation where we need to capture the when a record was created and modified and what user performed those actions. So I might have an object something like:
public class Product
{
int Id;
int Name;
DateTime…

Mark Boltuc
- 3,487
- 1
- 27
- 26
5
votes
1 answer
Perforce: Is there a straightforward way to track a code change to the original submission?
I have a source file //code/main/Foo.cpp whose line N was changed. After a combination of p4 annotate and p4 filelog, I found the change came in from a branch. (This is my understanding of e.g., git blame.)
Drilling into that branch I again used a…

fbrereto
- 35,429
- 19
- 126
- 178
4
votes
1 answer
How do I get all changes from SQL Server database usingchange tracking in a single query (or avoid being chatty with the database)?
I know it is possible to get the changes to a single table in SQL Server 2008 using change tracking.
However I have not been able to find an acceptable way to query all the changes in the entire database in a single query.
Is this possible?
What are…

SharePoint Newbie
- 5,974
- 12
- 62
- 103
4
votes
1 answer
Does SQL 2008 Express supports Change Tracking
Due to the lack of documentation for this on MSDN, I am forced to ask here.
Does the Express version support the same Change Tracking Feature(s) as the other editions does?
Thanks
leppie

leppie
- 115,091
- 17
- 196
- 297
4
votes
1 answer
EF Core don't detect changes when adding new entry on a relation for saved entities
I've a very basic setup to test and understand why EF Core 6 don't save related entities by default when adding new item to the many end of an already saved entity.
Can someone explain to me what is wrong with this setup?
And how can I make EF…

Mustafa Magdy
- 1,230
- 5
- 28
- 44
4
votes
0 answers
Understanding Ef Core's ChangeTracker with OwnsOne configuration
Using EF Core 5 and the ABP framework I have an entity of type System which has a owned type Property. Property itself is not an entity cause it has no identifier, just a value and a default value property:
public class System :…

Phija
- 41
- 3
4
votes
0 answers
Determining row commit order in table
Is there a way to determine the order in which the rows were committed into an append-only table? Suppose this is the schema:
CREATE TABLE [Operation] (
[Id] INT PRIMARY KEY IDENTITY,
[OperationId] UNIQUEIDENTIFIER NOT NULL…

Serguei
- 2,910
- 3
- 24
- 34
4
votes
1 answer
change tracking: TRACK_COLUMNS_UPDATED not working?
I have a table named tdc:
create table tdc(pk int primary key,val int)
I am trying to use change tracking on it. Here's the script:
drop table tdc
create table tdc(pk int primary key,val int)
ALTER TABLE tdc
ENABLE CHANGE_TRACKING
WITH…

George Menoutis
- 6,894
- 3
- 19
- 43
4
votes
1 answer
Invalid object name 'CHANGETABLE'
I just enabled change tracking by turning on ALLOW_SNAPSHOT_ISOLATION, executing this query to turn on change tracking for the database
ALTER DATABASE [DatabaseName]
SET CHANGE_TRACKING = ON (CHANGE_RETENTION = 2 DAYS,AUTO_CLEANUP = ON)
and by…

Cambesa
- 456
- 1
- 4
- 15
4
votes
2 answers
How to use SQL Server Change Tracking with Entity Framework
SQL Server has a very useful capability called Change Tracking that enables clients to track update and insert on data in a table.
I'm wondering, does EF support using these queries that use CHANGETABLE() function? Otherwise do you know any…

Ahmad
- 5,551
- 8
- 41
- 57
4
votes
2 answers
Trying to understand some SQL Server change tracking features
I'm working on SQL Server 2016 SP1 with the Change Tracking feature and I have a question for you.
I have a database which has Change Tracking enabled. That database contains a table Table which has "change tracking" activated, but not "track…

rognar
- 73
- 4