views:

806

answers:

2

I'm testing out my application with the hopes of migrating to SQL Server 2008 (From 200). In the SQL Server profiler, I'm seeing

    Audit Login
    SQL:BatchStarting             SELECT .....
    SQL:BatchCompleted            SELECT .....
    Audit Logout

for every single query that is being run. From what I can tell, this means that it's creating a new connection for every single query I run, and not using connection pooling. Is this the case? If it is, is there anything I can do to trouble shoot why connection pooling wouldn't be working. I'm using a single constant strings for connection strings, and I'm always closing (to release it back to the pool) the connection immediately after I'm done with it. My connection string doesn't have pooling disabled, and there is a minimum pool size of 10, with a maximum pool size of 1000.

Has anybody else experienced similar problems? Just in case it matters, it's an ASP.NET application (VB.NET) running on XP Professional (my development box). I've compiled my web app targetting the .NET 2 framework.

+4  A: 

This is expected behavior. From the documentation for the Audit Login Event Class:

The Audit Login event class indicates that a user has successfully logged in to Microsoft SQL Server. Events in this class are fired by new connections or by connections that are reused from a connection pool.

You should look at the appropriate connection performance counters to see how many connections you really have (on the client and server).

casperOne
A: 

To answer your question, No. This behavior does not mean that your connections are not being pooled. As casper explained, you will see these events even when pooled connections are reused.

Charles Bretana