• Erland Sommarskog (10/15/2013)


    Jeff Moden (10/15/2013)Perhaps I'm using the wrong words but I have to disagree. I don't have many examples but if you have a connection leak, for example, when using sp_OA*, you will have thousands of different spids and there will be one connection for each one. The same holds true for some of the connection leaks that you can get via an app. I'm not familiar with why the connections wouldn't automatically close when it comes from an app but we currently have a machine at work that has to be rebooted once a week (until AppDev takes the time to figure out where the leak is) because of this very problem.

    I'm not saying that connection leaks cannot occur, because they certainly do. With proper coding where you say

    using (SqlConnection cn = new SqlConnection(connstring)) {

    // code here

    }

    They do not happen, but if you rely on garbage collection to taking care of your connection, it can happen.

    But what Ellen is seeing is something completely different, and not related to the client layer, but it happens in SQL Server alone.

    Thanks, Erland. I appreciate the feedback. It'll be interesting to see what this actually turns out to be.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)