문제

I tried exec sp_depends @objname = 'sfel.elpc' but I did not get any results, but I know the synonym is referenced in at least one stored procedure.

도움이 되었습니까?

해결책

this code is better:

SELECT 
*
FROM sys.sql_modules m 
    INNER JOIN sys.objects o ON m.object_id=o.object_id
WHERE m.definition Like '%sfel.elpc%' and type = 'p'

this code give you a more limited list of objects.

다른 팁

try:

SELECT DISTINCT
    o.name,o.type_desc
    FROM sys.sql_modules        m 
        INNER JOIN sys.objects  o ON m.object_id=o.object_id
    WHERE m.definition Like '%sfel.elpc%'

You could try SQL Search by Red Gate, which is free. I'm by no means sure whether it supports synonyms, but might be worth a try if no other solutions are suggested.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top