Change Tracking in SQL Server 2008

Change tracking is a lightweight solution.If you have a large ammount of data in your database and you need to extract only the changes of last day.Now you are in deep trouble if yo didnot have a dedicated mechanism.There are some method available in SQL but Change Tracking is one of lighweight soloution for this

Syntax for this

Use [Master]

Go

ALTER DATABASE [DB_Track]

SET CHANGE_TRACKING = ON

(CHANGE_RETENTION = 3 DAYS, <
p> AUTO_CLEANUP = ON)

GO

there are two optional parameters one for change track of no of days and another is for deleting old data