Serial behaviour while using COM+

  • Hi,

    I'm running a distributed application which accesses the DB through a COM PLUS component in the DAL layer.

    While trying to generate 2 reports through 2 different instances of the same class in the application, I've found out that although the queries run in different threads, the calls in the databases are processed serially, furthermore - the calls are handled with the same SPID!!!. I checked out and made sure that the connection object I'm using is not pooled, and for each call I receive a different object.

    The result of this simptom is, that the short report will wait for the long one, if the long one was activated first.

    My question is, whether there is a way to tell the SQL server to manage each call in a different process (SPID) so the calls will be handled in parallel.

    Thanks,

    Busi

  • Are you calling these from the same instance of the application. If you have any component whether it is the client or an intermidary dll that is not mulit threaded then you will see single threaded behaviour.

    Simon Sabin

    Co-author of SQL Server 2000 XML Distilled

    http://www.amazon.co.uk/exec/obidos/ASIN/1904347088


    Simon Sabin
    SQL Server MVP

    http://sqlblogcasts.com/blogs/simons

  • Simon Hi. First of all thanks a lot for the quick reply.

    I'm not sure I fully understood your answer. Can you please elaborate?

    Do you mean I need to tag as "multithreaded" all the classes that take place in this COM PLUS transaction? I'm using .NET, so do I need to use a special attribute to use in this classes?

    BTW - I checked and each connection object is running in a different thread. Isn't is enough?

    Thanks again,

    Busi

  • You have to create each new thread, calls by default aren't asynchronous. I do not now the specifics but thats the basics.

    Simon Sabin

    Co-author of SQL Server 2000 XML Distilled

    http://www.amazon.co.uk/exec/obidos/ASIN/1904347088


    Simon Sabin
    SQL Server MVP

    http://sqlblogcasts.com/blogs/simons

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply