Reputation: 197
Is there a way using tsql to tell who was the last person to modify a stored procedure?
I am trying to find my changes versus my co-workers.
Upvotes: 2
Views: 13048
Reputation: 2771
The suggested solution with sys.objects can provide the information about the person who modified a stored procedure
I am trying to find my changes versus my co-workers.
This information is not available when using this query.To find your changes vs the changes your colleagues made, you can use:
For the latter one, you can use the fn_dblog function, or a third party tool such as ApexSQL Log
Disclaimer: I work as a Product Support Engineer at ApexSQL
Upvotes: 3
Reputation: 612
You could try looking at the last modification date. If you know who was logged in to their system at the time it can help narrow down your suspects.
Credit goes to Chris Diver: How to check date of last change in stored procedure or function in SQL server
SELECT name, create_date, modify_date
FROM sys.objects
WHERE type = 'P'
The type for a function is FN rather than P for procedure. Or you can filter on the name column.
Upvotes: 2