Compartir a través de


Audit Clase

The Audit object represents a SQL Server audit log.

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

Sintaxis

'Declaración
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
<PhysicalFacetAttribute> _
Public NotInheritable Class Audit _
    Inherits ScriptNameObjectBase _
    Implements ICreatable, IAlterable, IDroppable, IRenamable,  _
    IScriptable
'Uso
Dim instance As Audit
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[PhysicalFacetAttribute]
public sealed class Audit : ScriptNameObjectBase, 
    ICreatable, IAlterable, IDroppable, IRenamable, IScriptable
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::CheckOnSchedule)]
[PhysicalFacetAttribute]
public ref class Audit sealed : public ScriptNameObjectBase, 
    ICreatable, IAlterable, IDroppable, IRenamable, IScriptable
[<SealedAttribute>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
[<PhysicalFacetAttribute>]
type Audit =  
    class
        inherit ScriptNameObjectBase
        interface ICreatable
        interface IAlterable
        interface IDroppable
        interface IRenamable
        interface IScriptable
    end
public final class Audit extends ScriptNameObjectBase implements ICreatable, IAlterable, IDroppable, IRenamable, IScriptable

Notas

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

To set Audit object properties, users must have ALTER ANY SERVER AUDIT or CONTROL SERVER permission on the parent server.

To create an audit log, users must have ALTER ANY SERVER AUDIT or CONTROL SERVER permission on the parent server.

To drop an audit log, users must have ALTER ANY SERVER AUDIT or CONTROL SERVER permission on the parent server.

[!NOTA]

Any authenticated user can read and write to the Windows Application event log. The Application event log requires lower permissions than the Windows Security event log and is less secure than the Windows Security event log.

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.