Aracılığıyla paylaş


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)

Syntax

'Bildirim
<StateChangeEventAttribute("RENAME", "PROCEDURE")> _
<StateChangeEventAttribute("CREATE_PROCEDURE", "PROCEDURE")> _
<StateChangeEventAttribute("ALTER_PROCEDURE", "PROCEDURE")> _
<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)> _
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None Or AutomatedPolicyEvaluationMode.Enforce Or AutomatedPolicyEvaluationMode.CheckOnChanges Or AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
Public NotInheritable Class StoredProcedure
    Inherits ScriptSchemaObjectBase
    Implements IObjectPermission, ICreatable, IAlterable, IDroppable, _
    IRenamable, IExtendedProperties, IScriptable, ITextObject
[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
[StateChangeEventAttribute(L"RENAME", L"PROCEDURE")] 
[StateChangeEventAttribute(L"CREATE_PROCEDURE", L"PROCEDURE")] 
[StateChangeEventAttribute(L"ALTER_PROCEDURE", L"PROCEDURE")] 
[PhysicalFacetAttribute(PhysicalFacetOptions::ReadOnly)] 
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::None|AutomatedPolicyEvaluationMode::Enforce|AutomatedPolicyEvaluationMode::CheckOnChanges|AutomatedPolicyEvaluationMode::CheckOnSchedule)] 
public ref class StoredProcedure sealed : public ScriptSchemaObjectBase, IObjectPermission, ICreatable, IAlterable, 
    IDroppable, IRenamable, IExtendedProperties, IScriptable, ITextObject
/** @attribute StateChangeEventAttribute("RENAME", "PROCEDURE") */ 
/** @attribute StateChangeEventAttribute("CREATE_PROCEDURE", "PROCEDURE") */ 
/** @attribute StateChangeEventAttribute("ALTER_PROCEDURE", "PROCEDURE") */ 
/** @attribute PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly) */ 
/** @attribute EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None|AutomatedPolicyEvaluationMode.Enforce|AutomatedPolicyEvaluationMode.CheckOnChanges|AutomatedPolicyEvaluationMode.CheckOnSchedule) */ 
public final class StoredProcedure extends ScriptSchemaObjectBase implements IObjectPermission, ICreatable, 
    IAlterable, IDroppable, IRenamable, IExtendedProperties, IScriptable, 
    ITextObject
StateChangeEventAttribute("RENAME", "PROCEDURE") 
StateChangeEventAttribute("CREATE_PROCEDURE", "PROCEDURE") 
StateChangeEventAttribute("ALTER_PROCEDURE", "PROCEDURE") 
PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly) 
EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None|AutomatedPolicyEvaluationMode.Enforce|AutomatedPolicyEvaluationMode.CheckOnChanges|AutomatedPolicyEvaluationMode.CheckOnSchedule) 
public final class StoredProcedure extends ScriptSchemaObjectBase implements IObjectPermission, ICreatable, 
    IAlterable, IDroppable, IRenamable, IExtendedProperties, IScriptable, 
    ITextObject

Remarks

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 thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.

Target Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.