Section courante

A propos

Section administrative du site

CREATE EVENT SESSION

#NAMEDEF#
  Microsoft SQL Server

Syntaxe

CREATE EVENT SESSION event_session_name
ON { SERVER | DATABASE }
{
event_definition [ ,...n]
[ event_target_definition [ ,...n] ]
[ WITH ( event_session_options [ ,...n] ) ]
}
;

event_definition::=
{
ADD EVENT [event_module_guid].event_package_name.event_name
[ ( {
[ SET { event_customizable_attribute = value [ ,...n] } ]
[ ACTION ( { [event_module_guid].event_package_name.action_name [ ,...n] } ) ]
[ WHERE predicate_expression ]
} ) ]
}

predicate_expression ::=
{
[ NOT ] predicate_factor | {( predicate_expression ) }
[ { AND | OR } [ NOT ] { predicate_factor | ( predicate_expression ) } ]
[ ,...n ]
}

predicate_factor::=
{
predicate_leaf | ( predicate_expression )
}

predicate_leaf::=
{
predicate_source_declaration { = | < > | ! = | > | > = | < | < = } value
| [event_module_guid].event_package_name.predicate_compare_name ( predicate_source_declaration, value )
}

predicate_source_declaration::=
{
event_field_name | ( [event_module_guid].event_package_name.predicate_source_name )
}

value::=
{
number | 'string'
}

event_target_definition::=
{
ADD TARGET [event_module_guid].event_package_name.target_name
[ ( SET { target_parameter_name = value [ ,...n] } ) ]
}

event_session_options::=
{
[ MAX_MEMORY = size [ KB | MB ] ]
[ [,] EVENT_RETENTION_MODE = { ALLOW_SINGLE_EVENT_LOSS | ALLOW_MULTIPLE_EVENT_LOSS | NO_EVENT_LOSS } ]
[ [,] MAX_DISPATCH_LATENCY = { seconds SECONDS | INFINITE } ]
[ [,] MAX_EVENT_SIZE = size [ KB | MB ] ]
[ [,] MEMORY_PARTITION_MODE = { NONE | PER_NODE | PER_CPU } ]
[ [,] TRACK_CAUSALITY = { ON | OFF } ]
[ [,] STARTUP_STATE = { ON | OFF } ]
}

Description

Cette instruction permet de créer une session d'événement étendue identifiant la source d'un événement, la destination d'une session d'événements et les options de session d'événements.



Dernière mise à jour : Vendredi, le 19 Juin 2020