Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 help on Change Tracking

Author  Topic 

LearningIT
Starting Member

5 Posts

Posted - 2010-06-24 : 14:16:46
Dear folks,

I have a database of 40 tables. I want to track the changes and keep record of every change made in database. what would be best option ?

Note: i am using MS SQL Server 2005.

i have tried following code for Change Tracking

ALTER DATABASE Customer
SET CHANGE_TRACKING = ON
(AUTO_CLEANUP = ON , CHANGE_RETENTION = 5 DAYS)

but gives error

Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'ON'.

if anyone could help me on this issue, i would be greatful.

Kristen
Test

22859 Posts

Posted - 2010-06-24 : 14:28:46
Change Tracking is a SQL2008 feature, I think?
Go to Top of Page

LearningIT
Starting Member

5 Posts

Posted - 2010-06-24 : 14:30:27
yup i have checked. its of 2008 feature. can't work with 2005. what could be best solution for tracking changes ? in 2005
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2010-06-24 : 14:32:20
http://www.databasejournal.com/features/mssql/article.php/3824196/Introducing-Change-Tracking-in-SQL-Server-2008.htm

wow no kidding...now I'm really hot to go 2k8

If you're in 2k5 you are sol


OK...read first Brett, ponder...THEN SPEAK

No this is NOT what I thought

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-06-24 : 20:13:45
"what could be best solution for tracking changes ? in 2005"

Trigger on each table that INSERTs previous version of the record into an Archive table.
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2010-06-25 : 03:15:52
Check my blog on how to create audit tables "automatically":
http://thefirstsql.com/2010/05/21/create-an-audit-table-on-the-fly/

- Lumbago

My blog (yes, I have a blog now! just not that much content yet)
-> www.thefirstsql.com
Go to Top of Page
   

- Advertisement -