September 3, 2010 at 8:48 am
Is there a query or stored procedure in SQL 2005 can help me to see the log of a particular table? I want to see the changes in tables across different time frame.
Any idea?
September 3, 2010 at 9:10 am
If by log you mean changes, then for structure changes you can look at the default trace (if its running)
http://qa.sqlservercentral.com/articles/SQL+Server+2005/64547/"> http://qa.sqlservercentral.com/articles/SQL+Server+2005/64547/
for data changes you need to build that in yourself, possibly with triggers
September 3, 2010 at 10:35 am
There are no logs of what happened to a table. As Steve mentioned, there's a default trace, but it only keeps the last 25MB of stuff that happened on the server by default. You could set up some type of auditing for the database, or tables, but that can be a tremendous amount of data in there.
Follow me on Twitter: http://www.twitter.com/way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
September 3, 2010 at 1:07 pm
Use the default trace as steves mentioned.
Thank You,
Best Regards,
SQLBuddy
September 3, 2010 at 1:13 pm
Thank you all !!
I have been reading about it. I will need something historical and I need to know what changes were made on my tables. I will keep doing my research, any advice is appreciate it.
Have a nice long weekend everyone !
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply