Wednesday, October 8, 2014

List procedures and their dependent tables


distinct as 'Procedure Schema Name', as 'Procedure Name', as 'Table Schema Name', as 'Table Name' from sysdepends d

join sys.objects o1 on = o1.object_id

join sys.schemas s1 on o1.schema_id = s1.schema_id

join sys.objects o2 on d.depid = o2.object_id

join sys.schemas s2 on o2.schema_id = s2.schema_id


o1.type = 'P' and

o2.type = 'U'


by 1,2,3,4

1 comment:

  1. Dot Net Framework is the software framework developed by Microsoft Corporation. A programming infrastructure created by Microsoft for building, deploying, running applications and services use of Learn .net technologies such as desktop applications and web services. Dot Net Training in Chennai