Classe UserDefinedFunction
The UserDefinedFunction object represents a SQL Server user-defined function.
Spazio dei nomi: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Sintassi
'Dichiarazione
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None Or AutomatedPolicyEvaluationMode.Enforce Or AutomatedPolicyEvaluationMode.CheckOnChanges Or AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
<StateChangeEventAttribute("CREATE_FUNCTION", "FUNCTION")> _
<StateChangeEventAttribute("ALTER_FUNCTION", "FUNCTION")> _
<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)> _
<StateChangeEventAttribute("RENAME", "FUNCTION")> _
Public NotInheritable Class UserDefinedFunction _
Inherits ScriptSchemaObjectBase _
Implements ICreatable, IAlterable, IRenamable, IDroppable, _
IExtendedProperties, IScriptable, ITextObject, IColumnPermission, IObjectPermission
'Utilizzo
Dim instance As UserDefinedFunction
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None|AutomatedPolicyEvaluationMode.Enforce|AutomatedPolicyEvaluationMode.CheckOnChanges|AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[StateChangeEventAttribute("CREATE_FUNCTION", "FUNCTION")]
[StateChangeEventAttribute("ALTER_FUNCTION", "FUNCTION")]
[PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)]
[StateChangeEventAttribute("RENAME", "FUNCTION")]
public sealed class UserDefinedFunction : ScriptSchemaObjectBase,
ICreatable, IAlterable, IRenamable, IDroppable, IExtendedProperties,
IScriptable, ITextObject, IColumnPermission, IObjectPermission
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::None|AutomatedPolicyEvaluationMode::Enforce|AutomatedPolicyEvaluationMode::CheckOnChanges|AutomatedPolicyEvaluationMode::CheckOnSchedule)]
[StateChangeEventAttribute(L"CREATE_FUNCTION", L"FUNCTION")]
[StateChangeEventAttribute(L"ALTER_FUNCTION", L"FUNCTION")]
[PhysicalFacetAttribute(PhysicalFacetOptions::ReadOnly)]
[StateChangeEventAttribute(L"RENAME", L"FUNCTION")]
public ref class UserDefinedFunction sealed : public ScriptSchemaObjectBase,
ICreatable, IAlterable, IRenamable, IDroppable, IExtendedProperties,
IScriptable, ITextObject, IColumnPermission, IObjectPermission
[<SealedAttribute>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None|AutomatedPolicyEvaluationMode.Enforce|AutomatedPolicyEvaluationMode.CheckOnChanges|AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
[<StateChangeEventAttribute("CREATE_FUNCTION", "FUNCTION")>]
[<StateChangeEventAttribute("ALTER_FUNCTION", "FUNCTION")>]
[<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)>]
[<StateChangeEventAttribute("RENAME", "FUNCTION")>]
type UserDefinedFunction =
class
inherit ScriptSchemaObjectBase
interface ICreatable
interface IAlterable
interface IRenamable
interface IDroppable
interface IExtendedProperties
interface IScriptable
interface ITextObject
interface IColumnPermission
interface IObjectPermission
end
public final class UserDefinedFunction extends ScriptSchemaObjectBase implements ICreatable, IAlterable, IRenamable, IDroppable, IExtendedProperties, IScriptable, ITextObject, IColumnPermission, IObjectPermission
Osservazioni
The UserDefinedFunction object provides functionality that allows users to programmatically manage functions.
To get UserDefinedFunction object properties, users can be a member of the public fixed server role.
To set UserDefinedFunction object properties, users must have ALTER permission on the user-defined function.
To create a user-defined function, users must have CREATE FUNCTION permission on the database and ALTER permission on the specified schema.
To drop a user-defined function, users must have CONTROL permission on the user-defined function and ALTER permission on the specified schema.
To grant, deny, or revoke permissions on the user-defined function to other users, users must have CONTROL permission on the user-defined function.
Thread Safety
Tutti i membri statici pubblici (Shared in Microsoft Visual Basic) di questo tipo sono sicuri per le operazioni a thread multipli. Non è invece garantita la sicurezza dei membri dell'istanza.
Gerarchia di ereditarietà
System. . :: . .Object
Microsoft.SqlServer.Management.Smo. . :: . .SmoObjectBase
Microsoft.SqlServer.Management.Smo. . :: . .SqlSmoObject
Microsoft.SqlServer.Management.Smo. . :: . .NamedSmoObject
Microsoft.SqlServer.Management.Smo. . :: . .ScriptNameObjectBase
Microsoft.SqlServer.Management.Smo. . :: . .ScriptSchemaObjectBase
Microsoft.SqlServer.Management.Smo..::..UserDefinedFunction
Thread Safety
Tutti i membri pubblici static (Shared in Visual Basic) di questo tipo sono thread safe. I membri di istanza non hanno garanzia di essere thread safe.
Vedere anche