Session Element (XMLA)
APPLIES TO:SQL Server Analysis ServicesAzure Analysis Services
Uses the SOAP header in a SOAP request message to identify an existing, explicit session on an instance of Microsoft SQL Server Analysis Services.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> ... <Session xmlns="urn:schemas-microsoft-com:xml-analysis" SessionId="string" /> ... </soap:Header> <soap:Body> ... </soap:Body> </soap:Envelope>
|Data type and length||None|
|Cardinality||0-1: Optional element that can occur once and only once.|
|SessionId||Required String attribute that identifies the session to be used. Analysis Services uses a globally unique identifier (GUID) to identify a session.|
The Session header element identifies an existing, explicitly started session on the Analysis Services instance. The Session element is part of the SOAP header in the following types of messages:
A SOAP response that contains a BeginSession SOAP header element.
A session identifier does not guarantee that a session remains valid. The session specified in the Session element can expire. For example, a session can expire if the session times out or the connection associated with the session is disconnected. If the session expires and is no longer valid, Analysis Services ends the session and rolls back any transaction currently in process. Any SOAP message sent with a session identifier that is no longer valid fails with a SOAP fault indicating that the specified session cannot be found.
If a Session element is not sent as part of a SOAP request, the Analysis Services instance implicitly begins a session for the duration of the Discover or Execute method call, and then ends that session once the method call has completed.