Partilhar via


Classe ServerTraceEventSet

The ServerTraceEventSet object represents a set server trace events.

Hierarquia de herança

System.Object
  Microsoft.SqlServer.Management.Smo.EventSetBase
    Microsoft.SqlServer.Management.Smo.ServerTraceEventSet

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

Sintaxe

'Declaração
Public NotInheritable Class ServerTraceEventSet _
    Inherits EventSetBase
'Uso
Dim instance As ServerTraceEventSet
public sealed class ServerTraceEventSet : EventSetBase
public ref class ServerTraceEventSet sealed : public EventSetBase
[<SealedAttribute>]
type ServerTraceEventSet =  
    class 
        inherit EventSetBase 
    end
public final class ServerTraceEventSet extends EventSetBase

O tipo ServerTraceEventSet expõe os membros a seguir.

Construtores

  Nome Descrição
Método público ServerTraceEventSet() Initializes a new instance of the ServerTraceEventSet class.
Método público ServerTraceEventSet(ServerTraceEvent) Initializes a new instance of the ServerTraceEventSet class with a specified event.
Método público ServerTraceEventSet(array<ServerTraceEvent[]) Initializes a new instance of the ServerTraceEventSet class with the specified set of events.
Método público ServerTraceEventSet(ServerTraceEventSet) Initializes a new instance of the ServerTraceEventSet class with the specified set of events.

Início

Propriedades

  Nome Descrição
Propriedade pública AssemblyLoad Gets or sets a boolean property value that specifies whether the event is included in the event set.
Propriedade pública AuditAddDBUserEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública AuditAddloginEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a new login is added.
Propriedade pública AuditAddLoginToServerRoleEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a login is added to a server role.
Propriedade pública AuditAddMemberToDBRoleEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a new member is added to a database role.
Propriedade pública AuditAddRoleEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a new role is added.
Propriedade pública AuditAppRoleChangePasswordEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when the password for an application role is changed.
Propriedade pública AuditBackupRestoreEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a backup and restore operation is issued.
Propriedade pública AuditChangeAuditEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when audit trace modifications are made.
Propriedade pública AuditChangeDatabaseOwner Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when the database owner is changed.
Propriedade pública AuditDatabaseManagementEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a database is created, altered, or dropped.
Propriedade pública AuditDatabaseObjectAccessEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a database object is accessed, such as a schema.
Propriedade pública AuditDatabaseObjectGdrEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when grant, deny, or revoke operation is issued on a database object, such as a schema.
Propriedade pública AuditDatabaseObjectManagementEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a database object is created, altered or dropped.
Propriedade pública AuditDatabaseObjectTakeOwnershipEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when ownership of an object in the database scope is changed.
Propriedade pública AuditDatabaseOperationEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a database operation occurs, such as a checkpoint.
Propriedade pública AuditDatabasePrincipalImpersonationEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when there is an impersonation within the scope of the database, such as a SETUSER or an EXECUTE AS USER.
Propriedade pública AuditDatabasePrincipalManagementEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a principal, such as users, are created, altered, or dropped from the database.
Propriedade pública AuditDatabaseScopeGdrEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a grant, deny, or revoke operation is issued within the scope of the database.
Propriedade pública AuditDbccEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when DBCC commands are issued.
Propriedade pública AuditFulltext Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública AuditLogin Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a user successfully logs on to Microsoft SQL Server.
Propriedade pública AuditLoginChangePasswordEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a SQL Server login password is changed.
Propriedade pública AuditLoginChangePropertyEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a login property, other than password, is changed.
Propriedade pública AuditLoginFailed Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when an attempt to log in to SQL Server fails.
Propriedade pública AuditLoginGdrEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a grant, deny, or revoke operation is issued on a login object.
Propriedade pública AuditLogout Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a user successfully logs out of SQL Server.
Propriedade pública AuditSchemaObjectAccessEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when an object permission, such as SELECT, is used both successfully or unsuccessfully.
Propriedade pública AuditSchemaObjectGdrEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when an object grant, deny, or revoke operation is issued.
Propriedade pública AuditSchemaObjectManagementEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when an object is created, altered or dropped.
Propriedade pública AuditSchemaObjectTakeOwnershipEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when an ALTER AUTHORIZATION command is used to change the owner of an object.
Propriedade pública AuditServerAlterTraceEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a statement checks for the ALTER TRACE permission.
Propriedade pública AuditServerObjectGdrEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a grant, deny, or revoke operation is issued on a schema object, such as a table or a function.
Propriedade pública AuditServerObjectManagementEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a server objects are created, altered, or dropped.
Propriedade pública AuditServerObjectTakeOwnershipEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when the ownership is changed for objects within the scope of the server.
Propriedade pública AuditServerOperationEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when Security Audit operations such as altering settings, resources, external access, or authorization are used.
Propriedade pública AuditServerPrincipalImpersonationEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when there is an impersonation within scope of the server, such as EXECUTE AS LOGIN.
Propriedade pública AuditServerPrincipalManagementEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a server principals are created, altered, or dropped.
Propriedade pública AuditServerScopeGdrEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a grant, deny, or revoke operation for permissions is issued in the scope of the server, such as creating a login.
Propriedade pública BitmapWarning Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública BlockedProcessReport Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a process has been blocked for more than a specified amount of time.
Propriedade pública CpuThresholdExceeded Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública DatabaseMirroringStateChange Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when the state of a mirrored database changes.
Propriedade pública DatabaseSuspectDataPage Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública DataFileAutoGrow Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a data file is extended automatically by the server.
Propriedade pública DataFileAutoShrink Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a data file is reduced automatically by the server.
Propriedade pública DeadlockGraph Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when an attempt to acquire a lock is canceled because the attempt was part of a deadlock and was chosen as the deadlock victim.
Propriedade pública DeprecationAnnouncement Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a feature is used that will be removed from a future version of SQL Server.
Propriedade pública DeprecationFinalSupport Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a feature is used that will be removed from the next major version of SQL Server.
Propriedade pública Errorlog Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when error events are logged in the SQL Server error log.
Propriedade pública Eventlog Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when error events are logged in the SQL Server application.
Propriedade pública Exception Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when an exception occurs in SQL Server
Propriedade pública ExchangeSpillEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when communication buffers in a parallel query plan have been temporarily written to the tempdb database.
Propriedade pública ExecutionWarnings Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when warnings are issued during the execution of a SQL Server statement or stored procedure.
Propriedade pública FtCrawlAborted Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when an exception is encountered during a full-text crawl.
Propriedade pública FtCrawlStarted Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a full-text crawl (population) starts.
Propriedade pública FtCrawlStopped Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a full-text crawl (population) starts.
Propriedade pública HashWarning Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a hashing operation that is not processing on a buffer partition has reverted to an alternate plan.
Propriedade pública LockDeadlock Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when two concurrent transactions have deadlocked each other by trying to obtain incompatible locks on resources that the other transaction owns.
Propriedade pública LockDeadlockChain Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs for each of the events leading up to a deadlock.
Propriedade pública LockEscalation Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a fine-grained lock has been converted to a coarse-grained lock (for example, a page lock escalated or converted to a table lock).
Propriedade pública LogFileAutoGrow Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a log file was extended automatically by the server.
Propriedade pública LogFileAutoShrink Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a log file was reduced automatically by the server.
Propriedade pública MissingColumnStatistics Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when column statistics that would be useful for the optimizer are not available.
Propriedade pública MissingJoinPredicate Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a query that has no join predicate is being executed.
Propriedade pública MountTape Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a request to mount a tape is received.
Propriedade pública NumberOfElements Gets the number of elements in the event set. (Substitui EventSetBase.NumberOfElements.)
Propriedade pública ObjectAltered Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when an object is altered.
Propriedade pública ObjectCreated Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when an object is created.
Propriedade pública ObjectDeleted Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when an object is deleted.
Propriedade pública OledbCallEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública OledbDatareadEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública OledbErrors Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when an OLE DB error occurs.
Propriedade pública OledbProviderInformation Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública OledbQueryinterfaceEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública Qn_dynamics Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública Qn_parameterTable Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública Qn_subscription Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública Qn_template Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública ServerMemoryChange Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when SQL Server memory usage has increased or decreased by either 1 MB or 5 percent of the maximum server memory, whichever is greater.
Propriedade pública ShowplanAllForQueryCompile Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when an SQL statement compiles and displays complete, compile-time data.
Propriedade pública ShowplanXml Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública ShowplanXmlForQueryCompile Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when an SQL statement executes and displays the complete, compile-time data.
Propriedade pública ShowplanXmlStatisticsProfile Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública SortWarnings Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a sort warning is generated.
Propriedade pública SpCacheinsert Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when an item is inserted into the procedure cache.
Propriedade pública SpCachemiss Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a procedure is not found in the procedure cache.
Propriedade pública SpCacheremove Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when an item is removed from the procedure cache.
Propriedade pública SpRecompile Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs when a procedure is recompiled.
Propriedade pública SqlStmtrecompile Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade protegida Storage Gets or sets the bit array for event set storage. (Herdado de EventSetBase.)
Propriedade pública TraceAllEvents Gets or sets a Boolean property value that specifies whether all events are included in the trace or not.
Propriedade pública TraceClr Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública TraceDatabase Gets or sets a Boolean property value that specifies whether the Database category events are recorded in the trace.
Propriedade pública TraceDeprecation Gets or sets a Boolean property value that specifies whether Deprecation category events are recorded in the trace.
Propriedade pública TraceErrorsAndWarnings Gets or sets a Boolean property value that specifies whether errors and warnings are recorded in the trace.
Propriedade pública TraceFileClose Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event occurs if a trace file closes when a transaction is rolled back.
Propriedade pública TraceFullText Gets or sets a Boolean property value that specifies whether Full Text category events are recorded in the trace.
Propriedade pública TraceLocks Gets or sets a Boolean property value that specifies whether Lock category events are recorded in the trace.
Propriedade pública TraceObjects Gets or sets a Boolean property value that specifies whether Object category events are recorded in the trace.
Propriedade pública TraceOledb Gets or sets a Boolean property value that specifies whether OLE DB category events are recorded in the trace.
Propriedade pública TracePerformance Gets or sets a Boolean property value that specifies whether Performance category events are recorded in the trace.
Propriedade pública TraceQueryNotifications Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Propriedade pública TraceSecurityAudit Gets or sets a Boolean property value that specifies whether Security Audit category events are recorded in the trace.
Propriedade pública TraceServer Gets or sets a Boolean property value that specifies whether Server category events are recorded in the trace.
Propriedade pública TraceStoredProcedures Gets or sets a Boolean property value that specifies whether Stored Procedure category events are recorded in the trace.
Propriedade pública TraceTsql Gets or sets a Boolean property value that specifies whether Transact-SQL category events are recorded in the trace.
Propriedade pública TraceUserConfigurable Gets or sets a Boolean property value that specifies whether Lock category events are recorded in the trace.
Propriedade pública Userconfigurable0 Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event is configured by the user.
Propriedade pública Userconfigurable1 Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event is configured by the user.
Propriedade pública Userconfigurable2 Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event is configured by the user.
Propriedade pública Userconfigurable3 Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event is configured by the user.
Propriedade pública Userconfigurable4 Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event is configured by the user.
Propriedade pública Userconfigurable5 Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event is configured by the user.
Propriedade pública Userconfigurable6 Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event is configured by the user.
Propriedade pública Userconfigurable7 Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event is configured by the user.
Propriedade pública Userconfigurable8 Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event is configured by the user.
Propriedade pública Userconfigurable9 Gets or sets a Boolean property value that specifies whether the event is included in the event set. The event is configured by the user.
Propriedade pública UserErrorMessage Gets or sets a Boolean value that specifies whether the UserErrorMessage event is included in the event set.
Propriedade pública XqueryStaticType Gets or sets a Boolean property value that specifies whether the event is included in the event set.

Início

Métodos

  Nome Descrição
Método público Add(ServerTraceEvent) Returns a trace event set after adding a trace event to an existing event set.
Método públicoMembro estático Add(ServerTraceEventSet, ServerTraceEvent) Returns a trace event set after adding a trace event to an existing event set.
Método público Copy Returns a copy of the event set. (Substitui EventSetBase.Copy().)
Método público Equals (Herdado de Object.)
Método público GetHashCode (Herdado de Object.)
Método público GetType (Herdado de Object.)
Método público Remove Removes an event from the event set.
Método públicoMembro estático Subtract Returns a trace event set after subtracting a trace event from an existing event set.
Método público ToString Returns a string that represents the ServerTraceEventSet object. (Substitui Object.ToString().)

Início

Operadores

  Nome Descrição
Operador públicoMembro estático Addition Creates a server trace event set by performing an addition operation on a ServerTraceEvent object and a ServerTraceEventSet object.
Operador públicoMembro estático Subtraction Creates a server trace event set by performing a subtraction operation on a ServerTraceEvent object and a ServerTraceEventSet object.

Início

Comentários

The ServerTraceEventSet object contains a property for each event to which the server trace responds. The events fall into categories, which are described in Referência de classe de evento do SQL Server. The ServerTraceEventSet class is used to define a set of events that can be traced by SQL Server Profiler or the SMO Trace objects.

Só há suporte para esse namespace, classe ou membro na versão 2.0 do Microsoft .NET Framework.

Thread Safety

Qualquer membro público estático (Compartilhado no Microsoft Visual Basic) desse tipo é seguro para operações multi-threaded. Não há garantia de que qualquer membro de instância seja seguro para threads.

Exemplos

Manipulando eventos SMO

Segurança de thread

Qualquer membro público static (Shared no Visual Basic) desse tipo é seguro para threads. Não há garantia de que qualquer membro de instância seja seguro para threads.

Consulte também

Referência

Namespace Microsoft.SqlServer.Management.Smo

Outros recursos

Rastreando e reproduzindo eventos

Monitoring Events

Referência de classe de evento do SQL Server

sp_trace_setevent (Transact-SQL)