List of all Procedures and dependant Tables that are updated using linked server

Thanks to Deana Ritter for the queries below. Used to retrieve list of all updating stored procedures where we have use of linked servers for replication.

Select object_name(c.id) Proc_Name , object_name(d.depid) Table_Name, d.resultobj
From syscomments c inner join sysdepends d on c.id = d.id
Where d.resultobj = 1 and text like '%LinkedServerName%' and Text like '%OtherDatabaseName%'
Group by object_name(c.id) , object_name(d.depid) , d.resultobj

Comments

Natalia said…
Thanks for sharing this query. I tried to make such query but failed to get the correct result when executed. After looking at your query I realized what parameters I do have missed that are responsible for the wrong output.
sap support pack
Natalia said…
Thanks for sharing this query. I tried to make such query but failed to get the correct result when executed. After looking at your query I realized what parameters I do have missed that are responsible for the wrong output.
sap support pack

Popular Posts