110 pts.
 Tracking Table Changes SQL Server 2005
Is there a SQL Server 2005 script that would give all the table_names in a database, the last time they were updated and by whom? I've gotten as far as:
select name, modify_date 

from sys.tables

order by name
but I can't figure out the "user" part.

Software/Hardware used:
ASKED: October 5, 2008  6:15 PM
UPDATED: October 6, 2008  12:33 AM

Answer Wiki:
The modify_date that you have found is the last time someone added a column, removed a column, changed a data type, etc. It is not the last time that someone changed data within the table. SQL does not natively record the name of the last person to alter a table. You can setup a DDL trigger on the database to monitor this and log the information to a table. Like wise SQL does not record the last person to modify data within the table either. You can setup a normal trigger on the tables of interest and log this information to a table.
Last Wiki Answer Submitted:  October 5, 2008  9:10 pm  by  Denny Cherry   64,550 pts.
All Answer Wiki Contributors:  Denny Cherry   64,550 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Check out my SQL Server blog “SQL Server with Mr Denny” for more SQL Server information.

 64,550 pts.