다음을 통해 공유


Session.AddEvent 메서드 (String)

Adds a new Event object to the session from fully qualified event name.

네임스페이스:  Microsoft.SqlServer.Management.XEvent
어셈블리:  Microsoft.SqlServer.Management.XEvent(Microsoft.SqlServer.Management.XEvent.dll)

구문

‘선언
Public Function AddEvent ( _
    eventName As String _
) As Event
‘사용 방법
Dim instance As Session 
Dim eventName As String 
Dim returnValue As Event 

returnValue = instance.AddEvent(eventName)
public Event AddEvent(
    string eventName
)
public:
Event^ AddEvent(
    String^ eventName
)
member AddEvent : 
        eventName:string -> Event
public function AddEvent(
    eventName : String
) : Event

매개 변수

  • eventName
    유형: System.String
    A string value that contains the fully qualified name of the event.

반환 값

유형: Microsoft.SqlServer.Management.XEvent.Event
The newly created Event object.

예외

예외 조건
ArgumentNullException

Parameter eventName is null

XEventException

Event name is malformed or wrong.

참고 항목

참조

Session 클래스

AddEvent 오버로드

Microsoft.SqlServer.Management.XEvent 네임스페이스