Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
StoredProcedure Class
Collapse the table of content
Expand the table of content

StoredProcedure Class

The StoredProcedure object represents a SQL Server stored procedure.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

[StateChangeEventAttribute("RENAME", "PROCEDURE")]
[StateChangeEventAttribute("CREATE_PROCEDURE", "PROCEDURE")]
[StateChangeEventAttribute("ALTER_PROCEDURE", "PROCEDURE")]
[PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)]
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None|AutomatedPolicyEvaluationMode.Enforce|AutomatedPolicyEvaluationMode.CheckOnChanges|AutomatedPolicyEvaluationMode.CheckOnSchedule)]
public sealed class StoredProcedure : ScriptSchemaObjectBase, 
	IObjectPermission, ICreatable, IAlterable, IDroppable, IRenamable, 
	IExtendedProperties, IScriptable, ITextObject

To get StoredProcedure object properties, users can be a member of the public fixed server role.

To set StoredProcedure object properties, users must have ALTER permission on the stored procedure, or be a member of db_owner fixed database role.

To create a stored procedure, users must have CREATE PROCEDURE permission on the parent database or be a member of the db_owner fixed database role.

To drop a stored procedure, users must have CONTROL permission on the stored procedure or be a member of the db_owner fixed database role.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2015 Microsoft