Compartir a través de


StoredProcedure Clase

The StoredProcedure object represents a SQL Server stored procedure.

Espacio de nombres:  Microsoft.SqlServer.Management.Smo
Ensamblado:  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Sintaxis

'Declaración
<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
'Uso
Dim instance As StoredProcedure
[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
[<SealedAttribute>]
[<StateChangeEventAttribute("RENAME", "PROCEDURE")>]
[<StateChangeEventAttribute("CREATE_PROCEDURE", "PROCEDURE")>]
[<StateChangeEventAttribute("ALTER_PROCEDURE", "PROCEDURE")>]
[<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None|AutomatedPolicyEvaluationMode.Enforce|AutomatedPolicyEvaluationMode.CheckOnChanges|AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
type StoredProcedure =  
    class
        inherit ScriptSchemaObjectBase
        interface IObjectPermission
        interface ICreatable
        interface IAlterable
        interface IDroppable
        interface IRenamable
        interface IExtendedProperties
        interface IScriptable
        interface ITextObject
    end
public final class StoredProcedure extends ScriptSchemaObjectBase implements IObjectPermission, ICreatable, IAlterable, IDroppable, IRenamable, IExtendedProperties, IScriptable, ITextObject

Notas

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

Todos los miembros estáticos (compartidos en Microsoft Visual Basic) públicos de este tipo son seguros para operaciones multiproceso. No se garantiza que los miembros de instancia sean seguros para subprocesos.

Seguridad para subprocesos

Todos los miembros públicos static (Shared en Visual Basic) de este tipo son seguros para subprocesos. No se garantiza que los miembros de instancia sean seguros para subprocesos.