SQL Server Tips

SQL Server Change Tracking: Benefits, Limitations, and When to Use

Updated
3 min read
Written by
Mark Varnas

What is the SQL Server change tracking feature?

Change tracking was introduced in SQL Server 2008 to help you sync data.

It enables relatively easy access to new, changed, and deleted data, eliminating the need for brute-force comparisons or other costly methods of change detection.

Should you use change tracking?

Change tracking can save you time by eliminating the need for custom code.

However, it is not an ideal solution for databases experiencing a very high rate of transaction commits to the tracked tables.

The feature is commonly used in data warehousing applications where you need to pull incremental data (changes only) from your source.

Also, it can be used as a foundation for both one-way and two-way synchronization applications.

In these kinds of scenarios, change tracking is very beneficial.

However, it adds overhead and may cause potential performance issues.

If necessary, ensure you’re only tracking changes on tables that require it, as tracking many tables can bloat internal tables and impact performance.

If you don’t need it, disable it.

How to check if change tracking is enabled?

To list all databases that have change tracking enabled, use the script below:

SELECT d.name AS 'Database Name'
	,t.*
FROM sys.change_tracking_databases t
INNER JOIN sys.databases d ON d.database_id = t.database_id

How can I disable the change tracking on a SQL Server database?

You can disable using the ALTER DATABASE command with the option CHANGE_TRACKING like below.

Don’t forget to change [SampleDatabase] to your database name.

ALTER DATABASE SampleDatabase

SET CHANGE_TRACKING = OFF

Also, you can use SQL Server Management Studio:

  1. In Object Explorer, right-click on the Database
  2. Click Properties and select False on the Change Tracking tab:

More information:

Speak with a SQL Expert

In just 30 minutes, we will show you how we can eliminate your SQL Server headaches and provide 
operational peace of mind

Article by
Mark Varnas
Founder | CEO | SQL Veteran
Hey, I'm Mark, one of the guys behind Red9. I make a living performance tuning SQL Servers and making them more stable.

Discover More

SQL Server Health Check SQL Server Migrations & Upgrades SQL Server Performance Tuning SQL Server Security SQL Server Tips

Discover what clients are saying about Red9

Red9 has incredible expertise both in SQL migration and performance tuning.

The biggest benefit has been performance gains and tuning associated with migrating to AWS and a newer version of SQL Server with Always On clustering. Red9 was integral to this process. The deep knowledge of MSSQL and combined experience of Red9 have been a huge asset during a difficult migration. Red9 found inefficient indexes and performance bottlenecks that improved latency by over 400%.

Rich Staats 5 stars
Rich Staats
Cloud Engineer
MetalToad

Always willing to go an extra mile

Working with Red9 DBAs has been a pleasure. They are great team players and have an expert knowledge of SQL Server database administration. And are always willing to go the extra mile to get the project done.
5 stars
Evelyn A.
Sr. Database Administrator

Boosts server health and efficiency for enhanced customer satisfaction

Since adding Red9 to the reporting and DataWarehousing team, Red9 has done a good job coming up to speed on our environments and helping ensure we continue to meet our customer's needs. Red9 has taken ownership of our servers ensuring they remain healthy by monitoring and tuning inefficient queries.
5 stars
Andrew F.
Datawarehousing Manager
See more testimonials