Reputation: 768
I have hit an issue that I am not quite sure what has caused it, or how to cure it.
When I view the parameters of a stored procedure in the object explorer of management studio, they show more parameters than when I right click on the same stored procedure and select modify.
So if I expand the parameters I get:
dbo.ReportSummary
Parameters
@Types (nvarchar(max), input, No Default)
@month (int, Input, No Default)
@year (int, Input, No Default)
@groupID (int, Input, No Default)
@subGroupID (int, Input, No Default)
@dateRange (nvarchar(100), input, default)
Returns integer
If i then right click on the stored procedure and select modify from the popup menu, I get:
ALTER procedure [dbo].[ReportSampleSummaryDetailsByAsset]
@Types nvarchar(max),
@month int, @year int,
@groupID int, @SubUnitID int,
@dateRange nvarchar(100) = ''
as
.....
The subGroup is now missing.
The intelisense shows the parameters the same in the object explorer. If I check INFORMATION_SCHEMA.Parameters and sys.parameters, they both show the same as the object explorer. The schemas are both dbo.
The compatability level for the database and management studio are both Microsoft Sql Server 2014.
If it helps any, this is a backup of the publisher database.
What I need to know is:
Why are they different?
and
how do I make the parameters the same in the SP that I modify?
Upvotes: 0
Views: 131
Reputation: 31775
Refresh your object explorer. It needs to be explicitly refreshed when changes have been made to the underlying objects.
Right click on the procedure, and click "Refresh", then re-expand it.
Upvotes: 2