Tracking Table Changes SQL Server 2005

110 pts.
Tags:
SQL Server 2005
SQL Server administration
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.
ASKED: October 5, 2008  6:15 PM
UPDATED: October 6, 2008  12:33 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following