Databases Reference
In-Depth Information
client application are stored in the Session object and available to Multidimensional
Expressions (MDX) requests sent by the same client.
To work with sessions requests in XML/A, use the SOAP headers Begin Session , Session ,
and End Session . A client application that initiates a session sends its request with the
header Begin Session :
<Header>
<BeginSession mustUnderstand=”1” xmlns=”urn:schemas-microsoft-com: xml-analysis” />
</Header>
Analysis Services creates a Session object, and assigns it a unique identifier, which is
returned to the client in the header of the response:
<Header>
<Session SessionId=”CB3D45DF-E576-4943-9047-B63AA7EA3EB4” />
</Header>
Subsequent requests can pass this identifier to the server in a header Session so that they
can use the information stored in the Session object:
<Header>
<XA:Session mustUnderstand=”1” SessionId=”CB3D45DF-E576-4943-9047-
B63AA7EA3EB4” xmlns:XA=”urn:schemas-microsoft-com:xml-analysis” />
</Header>
After the client application completes its work with the session, it sends a request for
termination of the session using the header End Session . At that point, the saved infor-
mation in the Sessions object is deleted, and no longer available to requests:
<Header>
<XA:EndSession mustUnderstand=”1” SessionId=”CB3D45DF-E576-4943-9047-
B63AA7EA3EB4” xmlns:XA=”urn:schemas-microsoft-com: xml-analysis” />
</Header>
If a session contains a large amount of data, the server can easily run out of memory
unless the server can control the session's lifetime. The XML/A specification recommends
that the client application be prepared for a session to end on the server at any moment
and to have a mechanism in place to reconnect and reestablish its work. Analysis Services
has a mechanism for control over sessions: Session Manager, which deletes sessions in the
background when certain conditions are met.
To understand how Session Manager works, you need to understand the relationship
between connections and sessions (see Figure 32.1). Theoretically, there is a many-to-
many relationship between connections opened to Analysis Services and sessions created
on the server by client applications. Therefore, a user can work with multiple sessions
through one established connection, and client applications can use multiple connections
Search WWH ::




Custom Search