Questions tagged [change-tracking]

Questions about tracking changes to the data in a database.

Filter by
Sorted by
Tagged with
1
vote
1answer
27 views

Validating SQL Server Change Tracking Synchronization

I have some tables that I need to synchronize from one SQL Server database to another. I'm using SQL Server's "Change Tracking" feature. My program uses Change Tracking to synchronize the ...
0
votes
0answers
32 views

Sql service broker and SqlDependency

I have a system where my TCP/IP command prompt application receive data and insert that data in [database1].[mytable]. Now I want to move that data from [database1].[mytable] to [database2].[...
0
votes
0answers
83 views

Hash matches with collisions

I'm trying to improve certain matches that happen often, on many many dimension columns. So my choices as I understand are: Match on many columns Hash the columns, store the hash, match on that. If ...
4
votes
1answer
150 views

Change tracking causing latch contention

I am using Microsoft SQL Server 2016 (SP2-GDR) (KB4505220) - 13.0.5101.9 (X64) Jun 15 2019 23:15:58 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows Server 2012 R2 ...
0
votes
0answers
90 views

Can you update statistics on a sys change tracking table

I'm tracking down some poor query times doing the typical query to get changed records: select StoreItemId from changetable(changes [dbo].[StoreItem], @clientChangeTrackingVs) as ChangedRow where [...
6
votes
2answers
284 views

How to make sure change_tracking statistics stays updated

I am using Microsoft SQL Server 2016 (SP2-GDR) (KB4505220) - 13.0.5101.9 (X64) Jun 15 2019 23:15:58 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows Server 2012 R2 ...
2
votes
0answers
129 views

Performance drop after change tracking & isolation snapshot

Several days ago, I enabled change tracking on a db and some of its tables. A few days ago, I also SET ALLOW_SNAPSHOT_ISOLATION ON. (Probably important note: I never SET READ_COMMITTED_SNAPSHOT ON, ...
1
vote
0answers
22 views

How to “update” change_tracking setting to enable TRACK_COLUMNS_UPDATED

I have a table where I have enabled change tracking without TRACK_COLUMNS_UPDATED. I know this because if I go through SSMS's Generate scripts, I get the line: ALTER TABLE [dbo].[dt] ENABLE ...
0
votes
1answer
410 views

PostgreSQL Trigger to keep track of table changes

I am trying to create a trigger (Postgres 9.6) to track changes made to a table. This is my approach: CREATE OR REPLACE FUNCTION taxon_history() RETURNS trigger AS $BODY$ BEGIN IF TG_OP = '...
8
votes
1answer
8k views

Track all modifications to a PostgreSQL table

We have a table which has only roughly 500 rows, but it is very important for us. I want see all changes which happen to this table. The changes should get tracked with a timestamp. I don't want the ...
3
votes
0answers
110 views

Change Tracking generating enormous transaction logs

I'm troubleshooting a 24GB DB that is generating approx 2GB (compressed) of transaction logs/60min. Using the following command I'm tried to examine the contents of the log: SELECT Operation, ...
3
votes
1answer
501 views

MS SQL Server 2008 R2 duplicate key row in object 'sys.syscommittab'

I have a server that is failing to backup due to an error with the syscommittab and have gone through everything in this question: SQL Server 2008 unable to backup due to Failed to flush the commit ...
2
votes
4answers
445 views

Best practices for transferring data across long, wide tables

As part of my data warehouse project, I'll be transferring data from our OLTPs to the Data Warehouse. Some of the tables are long and wide so obviously, I'll only be transferring required columns. ...
1
vote
1answer
87 views

Why does my INSERT fail on SELECT permissions when I have change tracking enabled?

I have a user in a SQL Server 2014 database that only has permissions to insert into a table (no select permissions). When change tracking is enabled on the table, the inserts will fail with The ...
0
votes
0answers
320 views

Good practices for audit data changes for SQL Server 2016

In my current project we are required to keep the records of data changes for the Employee table at least for specific field for NOW (it can be extended for all the fields later). We are also ...
5
votes
2answers
4k views

Persistent Severity 016 alerts: “Change Tracking autocleanup is blocked on side table”

We had a large database running on a SQL Server 2014 Enterprise instance (evaluation license). Due to cost constraints, we had to move it to a new SQL Server 2017 Standard instance (per-core license; ...
0
votes
1answer
77 views

Track MySQL Procedure Changes in MySQL

We want to keep track of changes being done to MySQL procedures only, actually recently our procedures seem to have overwritten to some previous versions and we were unable to track it that who did ...
1
vote
3answers
67 views

How to keep records of past week visits in a web app?

I am developing a newspaper-like MVC webapp with an article content type which has a visits field. The database is MariaDB. Each time a visitor requests an article, the visits field of the article ...
1
vote
0answers
858 views

CHANGETABLE query too slow

I've got a table with the following DDL: CREATE TABLE dbo.SubscriberProduct (SubscriberId INT NOT NULL , ProductId INT NOT NULL , PRIMARY KEY (SubscriberId, ProductId)); GO I've then enabled ...
1
vote
1answer
90 views

Is it safe to make a Unique Index the Primary Key?

I have a vendor database that I want to use Change Data Tracking against but cannot because none of their tables have Primary Keys defined. The tables do have Unique Indexes but they are not defined ...
3
votes
1answer
323 views

Change Data Capture Use Case?

I'm working on a custom application that needs to determine changes to a particular column, on particular rows in our database (MS SQL 2008R2). When the row is created a created & modify ...
2
votes
1answer
809 views

Incremental sync for Sql Server

The Change Tracking feature of Sql Server allows to identify the modified rows of a modified database copy. This is obviously helpful for sync jobs, as the database can then be synced incrementally. ...
3
votes
1answer
222 views

Is it possible to have change tracking ONLY on a replication server, not original?

I am working on a system where we are pulling records from a replication server and need to know when changes have occurred. We would like to not have to touch the original server and only read from ...
2
votes
1answer
191 views

Identifying field changes between tables and consecutive rows

I need to build an audit report to identify field changes between two tables, as well as between consecutive rows in one of the tables. The first table (data) holds the current data: id data_id ...
6
votes
0answers
513 views

CHANGE_TRACKING_CURRENT_VERSION() incorrect on database in standby

We are using a change tracking solution to export increments for BI purposes for years now. But it was running directly on the production database. To lower the load on the system we wanted it to run ...
0
votes
1answer
532 views

SQL Server 2012 Data Change Tracking

We currently have a front end application that is business critical and uses Microsoft SQL Server as the database provider. I have been asked to create another system that mimics some of the functions ...
5
votes
1answer
1k views

using Change Tracking functions from another database

If I turn on change tracking on a database called Production, can I use the functions to get the change data from another database? For example: CHANGE_TRACKING_CURRENT_VERSION(); I have tried the ...
1
vote
0answers
90 views

Tracking Changes

I have an SSRS report with hierarchies for the company and their contact info. As these hierarchies change overtime, is there a way to track what has changed since the last run(run on a weekly basis)? ...
0
votes
0answers
69 views

how to track lob changes?

this question continues this one: I have table that simulate a file system or directory of text files with the following columns: file_name varchar2 not null primary key, file_text clob, ...
3
votes
1answer
909 views

Automatically detect table name in MSSQL Server database using stored function

I'm working on implementing Change Data Tracking in a SQL Server database and I set up a single table to test changes. In the past, changes have been made manually, but I'd like to create a way to ...
6
votes
1answer
1k views

SQL Change Tracking not tracking multi-record updates

I have SQL Server change tracking switched on a table with about 3mil rows. Switch on change tracking: ALTER DATABASE FooDB SET CHANGE_TRACKING = ON (CHANGE_RETENTION = 10 DAYS, AUTO_CLEANUP = OFF) ...
4
votes
1answer
2k views

Is it possible to use Change Tracking on a Replication target?

We have a setup where the production SQL Server databases are replicated to an offsite location using SQL Server Replication (transactional replication). I am looking at using SQL Server Change ...
12
votes
2answers
5k views

Will a Full-Text Catalog with Track changes: AUTO automatically update if Change Tracking for that table is not enabled?

I have this database table that is suppose to keep the full-text index up-to-date. However I am not seeing it happening at all (no error in the log because the last log I see was when I triggered it ...
1
vote
1answer
1k views

SQL Server Change Tracking and Replication

My colleagues and I are working on a solution revolving around change tracking… Our goal is to use SQL Server change tracking to track changes to be pushed to another non-SQL system. Our database is ...
2
votes
1answer
2k views

Invalid use of a side-effecting operator 'change_tracking_min_valid_version' within a function

I am trying to create a function wrapping change_tracking_min_valid_version(object_id), to simplify queries when using synonyms instead of table names. Something like this: CREATE FUNCTION ...
0
votes
1answer
342 views

Get list of all tables and columns “touched” by application

I need to find out where in the database changes are made, originating from an application. In other words: I'm not interested in the actual value changes, I'm interested in where these changes are ...
4
votes
2answers
1k views

SQL Server - monitor changes on linked server

We have a local SQL Server database which we have full control over, and in this local server we are linking a remote SQL Server database, to which we have only read access (no schema changes, no ...
0
votes
3answers
313 views

SQL Server: track database changes

I have two very similar database questions related to changes tracking. There are a lot of automation tests for an application, all of them use one database backup. Currently before each test ...
0
votes
2answers
5k views

Change Tracking cleanup

Is there a way to know when cleanup of change tracking tables occurs? How to check the last occurrence of a cleanup process? BACKGROUND: I have Change Tracking on database with retention set to 1 ...
6
votes
1answer
1k views

Change Tracking across several Tables

I'm looking into providing DB level change tracking within my system. I need to be able to track changes at an entity level, rather than just individual tables. Right now, we have triggers on each of ...
1
vote
1answer
4k views

How to track only DDL statements executed in MySQL

Can we track only executed DDL statements in MySQL but not DML statements. I dont want to use either binlog/general log to enable. I just wanted to track only DDL statements. I had gone through the ...
1
vote
1answer
746 views

Change Data Capture for Asynchronous Secondary Replica

MSDN states the following in Active Secondaries: Readable Secondary Replicas (AlwaysOn Availability Groups) for SQL Server 2014: Limitations and Restrictions: Change tracking and change data ...
2
votes
1answer
1k views

Can you use CDC on a subscriber for transactional replicaiton [closed]

Is there a way with SQL Server to have a limited number of tables replicated to another server using transactional replication and then use CDC or Change Tracking ONLY in the server replicated to?
1
vote
2answers
2k views

Is there a way to get an event when there's a change in a table?

Using Azure Sql Server, and in C# if that's relevant, is there a way to get an event when data in specific table changes? In one table we need an event if any column changes in a row. In a 2nd table ...
0
votes
1answer
2k views

How to find when change tracking was enabled?

How can I determine when change tracking was enabled on a table in a SQL database? Assume that this table has a regular cleanup routine, which means that looking at the oldest record in the change ...
0
votes
0answers
308 views

Track record deltas/changes on SQL Server 2008

Trying to build some sort of ETL process that copies rows from SQL Server into Elasticsearch indexing server. My ETL process should be able: Detect new rows inserted to the SQL Server table. Detect ...
13
votes
5answers
71k views

Detecting changes in a SQL Server table

In my application, with a DB running on SQL Server 2012, I've got a job (scheduled task) that periodically executes an expensive query and writes the results to a table that can later be queried by ...
9
votes
1answer
2k views

Did the Change Tracking internals change from SQL Server 2008 to 2012?

In trouble shooting an issue with synchronizing disconnected devices with a central database server, we are experiencing a problem after upgrading to SQL Server 2012 on the server. It appears that the ...
1
vote
1answer
4k views

Tracking changes in stored procedures within a database

Could you please help me out here. I have multiple databases and each of the databases have the same tables and stored procedures. I want to be able to compare the stored procedures and see if there ...
4
votes
1answer
1k views

How to track overhead of Change Tracking in SQL Server

We're going to implement a solution based on Change Tracking feature from SQL Server. Before going in production (even after), we'd like to keep track of the overhead the CT will introduce. Once in ...