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 |
|
the1gadget
Yak Posting Veteran
55 Posts |
Posted - 2008-05-20 : 10:32:07
|
| Hi AllI am trying to get a list of all the dependencies for objects in a database.I know about sp_depends however many of the objects are not in the catalogue that the object is in and therefore are not shown.Any help would be useful-- David |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-05-20 : 10:38:20
|
quote: Originally posted by the1gadget Hi AllI am trying to get a list of all the dependencies for objects in a database.I know about sp_depends however many of the objects are not in the catalogue that the object is in and therefore are not shown.Any help would be useful-- David
Didnt get that. Can you elaborate? What exactly are you trying to find? |
 |
|
|
the1gadget
Yak Posting Veteran
55 Posts |
Posted - 2008-05-20 : 10:50:06
|
| HiTo expand.e.g.I have a scalar function in one containerFooBar1.dbo.GetText(a,b)This looks into the following Tables in order and then jumps out when it has found a match.FooBar1.dbo.Text1FooBar2.dbo.Text2FooBar3.dbo.Text3If you do sp_depends GetTextYou get just table back (and the columns it references), and that table is in the same container [Foobar1] and it does not give the tables in the other containers.So what I would like is a way to get back a list likeFooBar1.dbo.Text1FooBar2.dbo.Text2FooBar3.dbo.Text3-- David |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-05-20 : 11:02:40
|
| May be try using sp_Msforeachdb 'sp_depends ''GetText''' |
 |
|
|
the1gadget
Yak Posting Veteran
55 Posts |
Posted - 2008-05-20 : 11:18:38
|
That comes back with a a number of results sets all the same and without any reference to the containers. -- David |
 |
|
|
|
|
|