Skip to main content


 

Symptoms

 


Attempted to set a stored procedure parameter as optional/not required via '@parameter nvarchar(max) = null', but the change is not reflected in the Service Object when refreshing the SQL Server service instance. Stored procedure executes successfully via SQL management studio when not specifying this parameter.
 

 

Diagnoses

 


SQL permission hardening/granularity was implemented. When granting 'Execute' permission to a stored procedure for the account that will be performing the registering/refreshing of the SQL service instance, the service object is surfaced but optional parameters specified by '@parameter nvarchar(max) = null' is not reflected in the service object definition. I believe this is a SQL behavior when missing the 'View definition' permission on this stored procedure an example of this behavior is 'attached.
 

 

15417i1E90774B4F09D366.png

 

Resolution

'dbo_owner' was granted to this database to refresh the service instance successfully but granting 'View definition' to this stored procedure object should also achieve the same end result. A documentation enhancement request was also logged for the SQL Server service broker for information regarding certain objects (tables, views, stored procedures) and permissions when performing SQL permission hardening/granularity.

 

 



 
Be the first to reply!

Reply