Friday, February 24, 2012

AMO ConectionID ?

Hello!

Simple question but I can't find an answer: How could I get my connection ID in AMO ? I'm tracing events with SessionTrace and would like to filter only on my connection ID.

Thx

The SessionTrace (property of the Server object) provides only the events from the session you have connected. Doesn't that do the filtering you need ?

AMO doesn't provide the ConnectionID, but only the SessionID.

To get a list of sessions IDs and the associated connection IDs, there is DISCOVER_SESSIONS schema that you can run with ADOMD.NET (but not with AMO).

Adrian

|||Now that you're telling me, it's obvious that SessionTrace only trace current session events so it should be enough!

What is the difference between connection ID and session ID ?

BTW Adrian, do you have an answer to the following thread (parallel ProcessAdd on partitions in AMO), I've the same question ;-)
http://groups.google.com/group/microsoft.public.sqlserver.olap/browse_thread/thread/923821b69982f073

Thanks for your help!
|||

> What is the difference between connection ID and session ID ?

There can be multiple connections (for example direct over TCP aka native connections or http(s) connections) that would send commands in the same session. The Analysis Services server generates both the connection IDs and session IDs as users connect and start new sessions (in the XML/A protocol, there is a SOAP header to request 'BeginSession', the server returns the session ID and the client uses in his next commands).

Once the user has a session ID (created with AMO or ADOMD.NET for example), he can open new connections and send commands in the same session; in AMO, the Server.Connect method has an overload that allows passing in the SessionID, while the default Connect() will generate a new session (by requesting the mentioned 'BeginSession').

However, Analysis Services server serializes all commands sent in the same session (so multiple connections working on the same session is not a way to do parallel work), with the exceptions of Cancel command and Subscribe command (that allows listening for events in the same session, for the SessionTrace).

Adrian

|||

David556922 wrote:

BTW Adrian, do you have an answer to the following thread (parallel ProcessAdd on partitions in AMO), I've the same question ;-)
http://groups.google.com/group/microsoft.public.sqlserver.olap/browse_thread/thread/923821b69982f073

I will need to investigate a bit and I'll send a reply in the next days. I know there are some limitations with the Process method that you used, but I need to find the details again.

|||Once again, thanks a lot for your help Adrian!

I'm looking forward to your feedback on the .Process limitations
|||

I posted a reply on the newsgroup about the .Process method issue:

http://msdn.microsoft.com/newsgroups/managed/default.aspx?&query=Adrian+Dumitrascu&lang=en&cr=US&guid=&sloc=en-us&dg=microsoft.public.sqlserver.olap&p=1&tid=28f54674-f557-4445-9ac2-a944f82072a1&mid=6bcf2298-53c7-4a6d-9aa9-23f308caad40

No comments:

Post a Comment