Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 74401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:21:09+00:00 2026-05-10T20:21:09+00:00

When I profile my application using SQL Server Profiler, I am seeing lots of

  • 0

When I profile my application using SQL Server Profiler, I am seeing lots of Audit Login and Audit Logout messages for connections to the same database. I am wondering, does this indicate that something is wrong with my connection pooling? The reason I ask, is because I found this in the MSDN documentation in regards to connection pooling:

Login and logout events will not be raised on the server when a connection is fetched from or returned to the connection pool. This is because the connection is not actually closed when it is returned to the connection pool. For more information, see Audit Login Event Class and Audit Logout Event Class in SQL Server Books Online.

http://msdn.microsoft.com/en-us/library/8xx3tyca.aspx

Also, does anyone have any tips for determining how effective the connection pooling is for a given SQL server? I have lots of databases on a single server and I know this can have a huge impact, but I am wondering if there is an easy way to obtain metrics on the effectiveness of my connection pooling. Thanks in advance!

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T20:21:09+00:00Added an answer on May 10, 2026 at 8:21 pm

    Remember that connections are pooled per connectionstring. If you have many databases and connect using many connectionstrings, your app will create a new connection when none exist with the correct connectionstring. Then it will pool that connection and, if the pool is full, bump an existing connection. The default Max Pool Size is 100 connections, so if you’re routinely bouncing through more than 100 databases, you’ll close and open connections all the time.

    It’s not ideal, but you can solve the problem by always connecting to a single database (one connection string) and then switch db context ‘USE [DBName]’. There are drawbacks:

    • You lose the ability to specify a user/pass per connection string (your app user needs permission to all databases).
    • Your SQL becomes more complex (especially if you’re using an out-of-the-box ORM or stored procs).

    You could experiment with increasing the Max Pool Size if your database count isn’t huge. Otherwise, if some databases are used frequently while others aren’t, you could turn pooling off on the infrequent dbs. Both items are configured via connectionstring.

    As far as metrics, monitoring the login and logout events on SQL Server is a good start. If your app is pooling nicely you shouldn’t see a lot of them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 179k
  • Answers 179k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use this for your TECR_Payments type: <xs:complexType name="TECR_Payments"> <xs:sequence> <xs:choice… May 12, 2026 at 3:51 pm
  • Editorial Team
    Editorial Team added an answer This should do it: ^([01]\d|2[0-3]):?([0-5]\d)$ The expression reads: ^ Start… May 12, 2026 at 3:51 pm
  • Editorial Team
    Editorial Team added an answer I have not been able to find a single JVM… May 12, 2026 at 3:51 pm

Related Questions

Making my first steps with NHibernate, I'm trying to have it creating my Tables
Hey all, I'm pulling my hair out on this one. I've checked all my
I have an application written in C# which uses Linq2SQL for communicating with the
I've been getting some extremely bizarre behaviour where NHibernate queries start to hang. I've

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.