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.
Author |
Topic |
sqlfresher2k7
Aged Yak Warrior
623 Posts |
Posted - 2008-08-05 : 14:38:52
|
I want a scripts or command where i can the check a user created function being used in stored procedures or views etc.Basically i need to check how many calls the function being used or called..Thanks for your help in advance !! |
|
sqlfresher2k7
Aged Yak Warrior
623 Posts |
Posted - 2008-08-05 : 14:53:21
|
I got it !!sp_depends functionname will display the dependants.. |
 |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2008-08-05 : 15:03:55
|
careful with sp_depends because I don't believe it will report dependencies from other databases. It certainly can't report on any scripts that depend on the object. Another issue could be the order that objects are created. If the dependent object is created after the depending object than it won't be included. You will get a warning when the object is compiled but it still will allow you to create it.Be One with the OptimizerTG |
 |
|
veerakarthi
Starting Member
3 Posts |
Posted - 2008-08-06 : 02:07:40
|
select object_name(id) from syscomments where text like '%FUNCTION NAME%'You can use this query for getting all objects used this function name.. But the difficulty is if u used the function name in any commented line also included in the result of above query... |
 |
|
|
|
|