Partager via


Session.AddTarget Method

Definition

Overloads

AddTarget(TargetInfo)

New a target and add it to this session.

AddTarget(String)

New a target from fully qualified target name and add it to this session .

AddTarget(TargetInfo)

New a target and add it to this session.

public Microsoft.SqlServer.Management.XEvent.Target AddTarget (Microsoft.SqlServer.Management.XEvent.TargetInfo targetInfo);
member this.AddTarget : Microsoft.SqlServer.Management.XEvent.TargetInfo -> Microsoft.SqlServer.Management.XEvent.Target
Public Function AddTarget (targetInfo As TargetInfo) As Target

Parameters

targetInfo
TargetInfo

The target info.

Returns

The newly created target object.

Applies to

AddTarget(String)

New a target from fully qualified target name and add it to this session .

public Microsoft.SqlServer.Management.XEvent.Target AddTarget (string targetName);
member this.AddTarget : string -> Microsoft.SqlServer.Management.XEvent.Target
Public Function AddTarget (targetName As String) As Target

Parameters

targetName
String

Name of the target.

Returns

The newly created target object.

Exceptions

Target name is malformed or wrong.

Parameter targetName is null

Applies to