Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 how to find the all objects exists in a sp?

Author  Topic 

rammohan
Posting Yak Master

212 Posts

Posted - 2009-11-20 : 01:22:15
hi,
i have a stored procedure. i need to list out all the objects used in that sp.
1. i need to list out tables used by that sp n columns used by that sp.
2. i need to list out sp's used by this sp(if there).
3. i need to list functions used by this sp.
4. i need to list out input and out put parametrs used by this sp?

i need to perform it by using a query. please help me

One can never consent to creep,when one feels an impulse to soar
RAMMOHAN

rammohan
Posting Yak Master

212 Posts

Posted - 2009-11-20 : 03:46:23
please help me asap

One can never consent to creep,when one feels an impulse to soar
RAMMOHAN

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-11-20 : 03:46:51

exec sp_depends 'your procedure name'

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

rammohan
Posting Yak Master

212 Posts

Posted - 2009-11-20 : 03:57:19
hi madhavinan,

thanks for u r reply. can fill this result into temporary tables?

One can never consent to creep,when one feels an impulse to soar
RAMMOHAN

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-11-20 : 04:01:59
quote:
Originally posted by rammohan

hi madhavinan,

thanks for u r reply. can fill this result into temporary tables?

One can never consent to creep,when one feels an impulse to soar
RAMMOHAN




declare @sp_depends table(name varchar(100),type)
insert into @sp_depends (name,type)
exec sp_depends 'your procedure name'

select * from @sp_depends

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -