Thk Mike, but here a follow-up questions
you should not be able to create the second if the first doesn't not exist, right?
What would happen if you create the spA then spB then drop and create spA, will i lose the dependency?
if it's the case that's what happen to us, i will only need to recompile all udf in the right order...and that was my first question....(250+ udf to reorder :| ), I'll problably build a more "permanent" dependencies table since the evolution rate of our DataBase is very fast
Alain
>Sysdepends is not automatically kept up to date by the server. It is only updated with you compile a stored procedure and any referenced object already exists. As an example, say that you had two stored procedures spA and spB and spB is dependent on spA. If you create spA and then create spB, sysdepends will be correct. OTOH, if you create spB before creating spA, sysdepends will not be correct. SQL Server will raise a warning message describing the situation.
>
>-Mike
>
>
>>Hi,
>>
>> I've been playing with the SP Sp_depends and table system table SysDepends. I've notice that some time I'm missing some dependencies. I'm trying building a script that will give me all dependencies for one specific object (table, udf, sp...)
>>
>>Here the SQL :
>>
>>Select C.Name as ParentName, B.Name as ChildName, A.Id, A.DepId
>> From sysdepends A
>> Inner join sysobjects B
>> On A.Id = B.Id
>> Inner join sysobjects C
>> On A.DepId = C.Id
>> Where C.Name = 'Customer' and b.xType = 'IF' -- all UDF for Customer
>> Group by C.Name, B.Name, A.Id, A.DepId
>>
>>Now I've dropped the missing UDF and recreated it and when I rerun the same sql it shows up. is there's a way to "refresh" all dependencies so that this selection will see all?
>>
>>Alain
>>Analystik Inc.