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
 SQL Server Administration (2005)
 Last activity on a table

Author  Topic 

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2008-02-13 : 14:46:37
How to find a last activity happened on a table?

hey001us
Posting Yak Master

185 Posts

Posted - 2008-02-13 : 15:12:51
There is no enough information...

hey
Go to Top of Page

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2008-02-13 : 15:18:11
I am trying to find out who performed last activity on a table like update, delete or insert.
Thanks in advance
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-02-13 : 15:49:08
Track with the Trigger.
Go to Top of Page

dewacorp.alliances

452 Posts

Posted - 2008-02-13 : 16:19:03
quote:
Track with the Trigger.



As a DBA, do you guys put a trigger on every single table to track this? What your opinion anyway?
Go to Top of Page

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2008-02-13 : 17:10:06
Can any body please let me know how I can find last activity occured on a table.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-02-13 : 17:36:04
Try this
select name,create_date,modify_date from sys.tables
WHERE create_date <> modify_date
ORDER BY modify_Date
Go to Top of Page

dewacorp.alliances

452 Posts

Posted - 2008-02-13 : 20:03:59
quote:
Originally posted by sodeep

Try this
select name,create_date,modify_date from sys.tables
WHERE create_date <> modify_date
ORDER BY modify_Date




This thing is only for finding out the structure of that table is changed I think not the records.

Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-02-16 : 00:07:27
Use sql auditing tool.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-16 : 02:17:39
Use a trigger to put information on action performed and infomation of user who performed action onto a table.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-02-16 : 14:33:23
That costs too much.
Go to Top of Page
   

- Advertisement -