Questions tagged [change-tracking]

Change tracking is the process of recording changes made to data as they are made.

356 questions
4
votes
1 answer

SQL Server: How to list changed columns with change tracking?

I use SQL Server 2012 Standard edition, and I activated Change Tracking function on a table. When I list changes on a table with the CHANGETABLE function, I have a SYS_CHANGE_COLUMNS property with binary data…
Anthony Brenelière
  • 60,646
  • 14
  • 46
  • 58
4
votes
2 answers

Azure Search Indexer error: "Document key cannot be missing or empty."

I have an index in azure search which is synced to an SQL server table through Change Tracking. I randomly start getting this error after I make some changes to the table (but not always, and I can't seem to replicate it consistently…
Francesco
  • 147
  • 1
  • 10
4
votes
0 answers

Change tracking in postgres

I want to track changes on some tables in Postgres. Is there any native means in PG for doing this? Probably not, because this requirement may be very specific depending on use-case. I would like to observe only some columns in table for changes,…
Valentin H
  • 7,240
  • 12
  • 61
  • 111
4
votes
2 answers

How to add an entity without related entities, but saving relation?

As far as I understand, if I change a state of an entry in context like that: context.Entry(doc).State = EntityState.Added; the whole object graph behind doc will be set to EntityState.Added. That is how this mechanism described here: Note that…
astef
  • 8,575
  • 4
  • 56
  • 95
4
votes
0 answers

What causes the minimum valid version to be greater than the current version when using sql server change tracking?

I'm using sql server change tracking and I noticed some unexpected behavior that doesn't seem to be documented. The documentation indicates that the value returned by CHANGE_TRACKING_MIN_VALID_VERSION ( table_object_id ) should be compared against…
BenR
  • 11,296
  • 3
  • 28
  • 47
4
votes
1 answer

Microsoft Sync Framework 2.1 with Change Tracking Server & Client Database Synchronization in C#

I'm very new to asp.net with database synchronization. Currently I'm implementing a project that required Server (SQL Server 2010) <> C# Client (SQLite) bidirenctional database synchronization using change tracking. I had go through most of the…
4
votes
3 answers

What is the best way to transparently log changes to objects when using LINQ-to-SQL?

I keep track of all changes that are made to objects so that the user can view and rollback to any previous version of any item in the database. The history database table looks like this: Item | ItemId | Field | WhenChanged |…
Edward Tanguay
  • 189,012
  • 314
  • 712
  • 1,047
4
votes
2 answers

Is it possible to enable relationship fixup when change tracking is disabled but proxies are generated

I have entities which form a tree relationships. class MyEntity { public int Id {get;set;} public int ParentId {get;set;} public virtual MyEntity Parent {get;set;} public virtual ICollection Children {get;set;} } When…
4
votes
2 answers

SQL Azure. Change tracking

After some time googling I've found that Change Data Capture functionality is not supported on SQL Azure. This is frustrating for me because I'd like to implement change tracking without significant code changes, which are needed in case of…
Anatolii Gabuza
  • 6,184
  • 2
  • 36
  • 54
3
votes
1 answer

Stored Procedure / CHANGETABLE function slow with parameters, fast with literal

I'm using Change Tracking in SQL2008 R2 and seeing a very odd behaviour when trying to determine rows affected in a batch, a stored proc takes ~30 seconds to run when using a parameter value, but when I put the literal values in the call to the…
Craig Parsons
  • 137
  • 1
  • 1
  • 4
3
votes
2 answers

Is my understanding of IsLoaded correct?

Here is some code along with my assumptions based on playing around in LINQPad. Can anyone confirm this is how the lazy loading is working, and perhaps provide any additional insight/links so I can understand how it's working on the back end? Thanks…
Ocelot20
  • 10,510
  • 11
  • 55
  • 96
3
votes
2 answers

Why does Entity Framework detect changes on properties which were modified but reset?

If I modify a property of a POCO Entity, but reset it the EntityFramework still says that there are changes. Property "Name": Value "Test" (original value) -> Value "Test123" (value changed by UI) -> Value "Test" (value…
3
votes
4 answers

MySQL database change tracking

What tools are you using to track changes in your MySQL database? Currently I'm in a project where we use a plain text-file (version controlled via SVN) in which we manually add SQL statements when making changes to the database.Many of the changes…
fredrik
  • 13,282
  • 4
  • 35
  • 52
3
votes
1 answer

A new Pharo version was launched. What do I do with my old images?

I noticed Pharo 9 was released past month (july 2021). I have several Pharo 8 images with packages and classes I created while learning programming in Pharo. Is it possible to just update the old image to the new version, or the standard way is to…
kleite
  • 195
  • 1
  • 16
3
votes
2 answers

Manually cleanup CHANGE TRACKING in SQL Server

I am trying to manually clean the change tracking tables within SQL Server 2017. I run the command exec sp_flush_CT_internal_table_on_demand 'mydb.data.foobar' Error message: Msg 2501, Level 16, State 1, Procedure…
brewsky
  • 607
  • 1
  • 9
  • 15