Поделиться через


Класс ServerTraceEventSet

The ServerTraceEventSet object represents a set server trace events.

Иерархия наследования

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

Пространство имен:  Microsoft.SqlServer.Management.Smo
Сборка:  Microsoft.SqlServer.Smo (в Microsoft.SqlServer.Smo.dll)

Синтаксис

'Декларация
Public NotInheritable Class ServerTraceEventSet _
    Inherits EventSetBase
'Применение
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

Тип ServerTraceEventSet обеспечивает доступ к следующим элементам.

Конструкторы

  Имя Описание
Открытый метод ServerTraceEventSet() Initializes a new instance of the ServerTraceEventSet class.
Открытый метод ServerTraceEventSet(ServerTraceEvent) Initializes a new instance of the ServerTraceEventSet class with a specified event.
Открытый метод ServerTraceEventSet(array<ServerTraceEvent[]) Initializes a new instance of the ServerTraceEventSet class with the specified set of events.
Открытый метод ServerTraceEventSet(ServerTraceEventSet) Initializes a new instance of the ServerTraceEventSet class with the specified set of events.

В начало

Свойства

  Имя Описание
Открытое свойство AssemblyLoad Gets or sets a boolean property value that specifies whether the event is included in the event set.
Открытое свойство AuditAddDBUserEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство AuditFulltext Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство BitmapWarning Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство 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.
Открытое свойство CpuThresholdExceeded Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство 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.
Открытое свойство DatabaseSuspectDataPage Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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).
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство NumberOfElements Gets the number of elements in the event set. (Переопределяет EventSetBase.NumberOfElements.)
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство OledbCallEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство OledbDatareadEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство 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.
Открытое свойство OledbProviderInformation Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство OledbQueryinterfaceEvent Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство Qn_dynamics Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство Qn_parameterTable Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство Qn_subscription Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство Qn_template Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство ShowplanXml Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство 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.
Открытое свойство ShowplanXmlStatisticsProfile Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство SqlStmtrecompile Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Защищенное свойство Storage Gets or sets the bit array for event set storage. (Производный от EventSetBase.)
Открытое свойство TraceAllEvents Gets or sets a Boolean property value that specifies whether all events are included in the trace or not.
Открытое свойство TraceClr Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство TraceDatabase Gets or sets a Boolean property value that specifies whether the Database category events are recorded in the trace.
Открытое свойство TraceDeprecation Gets or sets a Boolean property value that specifies whether Deprecation category events are recorded in the trace.
Открытое свойство TraceErrorsAndWarnings Gets or sets a Boolean property value that specifies whether errors and warnings are recorded in the trace.
Открытое свойство 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.
Открытое свойство TraceFullText Gets or sets a Boolean property value that specifies whether Full Text category events are recorded in the trace.
Открытое свойство TraceLocks Gets or sets a Boolean property value that specifies whether Lock category events are recorded in the trace.
Открытое свойство TraceObjects Gets or sets a Boolean property value that specifies whether Object category events are recorded in the trace.
Открытое свойство TraceOledb Gets or sets a Boolean property value that specifies whether OLE DB category events are recorded in the trace.
Открытое свойство TracePerformance Gets or sets a Boolean property value that specifies whether Performance category events are recorded in the trace.
Открытое свойство TraceQueryNotifications Gets or sets a Boolean property value that specifies whether the event is included in the event set.
Открытое свойство TraceSecurityAudit Gets or sets a Boolean property value that specifies whether Security Audit category events are recorded in the trace.
Открытое свойство TraceServer Gets or sets a Boolean property value that specifies whether Server category events are recorded in the trace.
Открытое свойство TraceStoredProcedures Gets or sets a Boolean property value that specifies whether Stored Procedure category events are recorded in the trace.
Открытое свойство TraceTsql Gets or sets a Boolean property value that specifies whether Transact-SQL category events are recorded in the trace.
Открытое свойство TraceUserConfigurable Gets or sets a Boolean property value that specifies whether Lock category events are recorded in the trace.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство 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.
Открытое свойство UserErrorMessage Gets or sets a Boolean value that specifies whether the UserErrorMessage event is included in the event set.
Открытое свойство XqueryStaticType Gets or sets a Boolean property value that specifies whether the event is included in the event set.

В начало

Методы

  Имя Описание
Открытый метод Add(ServerTraceEvent) Returns a trace event set after adding a trace event to an existing event set.
Открытый методСтатический элемент Add(ServerTraceEventSet, ServerTraceEvent) Returns a trace event set after adding a trace event to an existing event set.
Открытый метод Copy Returns a copy of the event set. (Переопределяет EventSetBase.Copy().)
Открытый метод Equals (Производный от Object.)
Открытый метод GetHashCode (Производный от Object.)
Открытый метод GetType (Производный от Object.)
Открытый метод Remove Removes an event from the event set.
Открытый методСтатический элемент Subtract Returns a trace event set after subtracting a trace event from an existing event set.
Открытый метод ToString Returns a string that represents the ServerTraceEventSet object. (Переопределяет Object.ToString().)

В начало

Операторы

  Имя Описание
Открытый операторСтатический элемент Addition Creates a server trace event set by performing an addition operation on a ServerTraceEvent object and a ServerTraceEventSet object.
Открытый операторСтатический элемент Subtraction Creates a server trace event set by performing a subtraction operation on a ServerTraceEvent object and a ServerTraceEventSet object.

В начало

Замечания

The ServerTraceEventSet object contains a property for each event to which the server trace responds. The events fall into categories, which are described in Руководство по классам событий 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.

Это пространство имен, класс или элемент поддерживаются только платформой Microsoft .NET Framework версии 2.0.

Thread Safety

Все общие статические члены этого типа (Shared в Microsoft Visual Basic) можно использовать в многопоточных операциях. Потокобезопасная работа с членами экземпляров типа не гарантируется.

Примеры

Обработка событий SMO

Безопасность многопоточности

Любые открытые статический (Shared в Visual Basic) элементы этого типа потокобезопасны. Потокобезопасность с элементами экземпляров не гарантируется.

См. также

Справочник

Пространство имен Microsoft.SqlServer.Management.Smo

Другие ресурсы

Трассировка и воспроизведение событий

Monitoring Events

Руководство по классам событий SQL Server

Хранимая процедура sp_trace_setevent (Transact-SQL)