question

bradjoss avatar image
bradjoss asked

Synonym Procedures: How to find parameters?

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.
stored-proceduressynonymssystem-objects
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.