Quantcast
Channel: Questions in topic: "synonyms"
Viewing all articles
Browse latest Browse all 14

Synonym Procedures: How to find parameters?

$
0
0
With a stored procedure, I can query sys.parameters to find parameter details about procedures. However, if I create a synonym for a SP in another system, how can I detect what parameters are associated with that synonym? Example: USE [DatabaseA] GO CREATE PROCEDURE [dbo].[TestProcOnA] (@x int) AS RETURNS @x GO -- Note that this will show the SP parameters as expected... select so.name, sp.name From sys.parameters sp inner join sys.objects so on (sp.[object_id] = so.[object_id]) where so.name = 'TestProcOnA' USE [DatabaseB] GO CREATE SYNONYM [dbo]. [TestProcOnA] FOR [DatabaseA]. [dbo]. [TestProcOnA] GO QUESTION: From DatabaseB, how can I see what parameters are associated with (synonym) [dbo]. [TestProcOnA]? Best case would be to not have to UNION the query between the two databases if possible. P.S. INFORMATION_SCHEMA.PARAMETERS yields the same symptoms.

Viewing all articles
Browse latest Browse all 14

Trending Articles