Partager via


Méthode XEStore.CreateSessionFromTemplate

Creates a Session object from template file specified by the fileName parameter.

Espace de noms :  Microsoft.SqlServer.Management.XEvent
Assembly :  Microsoft.SqlServer.Management.XEvent (en Microsoft.SqlServer.Management.XEvent.dll)

Syntaxe

'Déclaration
Public Function CreateSessionFromTemplate ( _
    sessionName As String, _
    fileName As String _
) As Session
'Utilisation
Dim instance As XEStore 
Dim sessionName As String 
Dim fileName As String 
Dim returnValue As Session 

returnValue = instance.CreateSessionFromTemplate(sessionName, _
    fileName)
public Session CreateSessionFromTemplate(
    string sessionName,
    string fileName
)
public:
Session^ CreateSessionFromTemplate(
    String^ sessionName, 
    String^ fileName
)
member CreateSessionFromTemplate : 
        sessionName:string * 
        fileName:string -> Session
public function CreateSessionFromTemplate(
    sessionName : String, 
    fileName : String
) : Session

Paramètres

  • fileName
    Type : System.String
    A string value that specifies the name of the file.

Valeur de retour

Type : Microsoft.SqlServer.Management.XEvent.Session
A Session object from template file specified by the fileName parameter.

Exceptions

Exception Condition
XEventException

Parameters are wrong, or failed to create session.

XmlException

The template file is malformed.

UnauthorizedAccessException

The template file can't be accessed.

XmlSchemaValidationException

The template file doesn't conform to the schema.

Voir aussi

Référence

XEStore Classe

Espace de noms Microsoft.SqlServer.Management.XEvent