Eric M Russell (5/7/2012)
This is a good script.One suggested addition would be a 'schemaname' column. When I'm unit testing in Development, I often times have a different version of the stored procedure contained under different schema(s), so I can compare their runtime side by side.
select
...
os.schemaname,
...
join (select object_id id, schema_name(schema_id)schemaname
from sys.objects) os on os.id = object_id
...
Good suggestion but no need to join unnecessarily - use OBJECT_SCHEMA_NAME([object_id])
😉
gsc_dba