Debate - .Net Dev Vs. DBA Who will win?

  • Sounds like your developers open up a connection pool per user, i.e. within the session objects.  They should open a connection pool and then re-use it within each session, let it grow slowly according to requirements.  Tell them to fix the scope of their objects, i.e. rather re-use a connection pool rather than creating several pools!!

  • I am not sure why connection pooling is needed at all. I thought the whole idea of pooling was to reduce the number of connections needed by intermediate (web or middle tier) servers. If these 50 client boxes are each making direct connections to the database, why would any of them need more than one connection? - unless they need to run more than one query at a time...

  • The way I understand it, connection pooling is more about performance than reducing the number of connections needed. Making a brand-new connection to the server is expensive/time consuming (relatively), connection pooling helps to mitigate this by "holding on" to some connections (after they are released by the application), such that when your app asks for another connection, it comes from the already-connected "pool" of connections rather than taking the time to establich a new connection from scratch.

  • have him add a Dispose Method to the module to handle all the module scoped objects

    and end each function with

     

    dispose()

    return moDS

     

    Public sub Dispose()

    moSelCmd = nothing           

    moDA = nothing           

    moDataConn.close

    modataconn = nothing

    end sub
     
    thatll make them go away
  • "Open() in a try/catch/finally and be sure to explicitly close the connection when the code is done with it."

    This is absolutely true.  The connection should should ALWAYS be closed within the finally block.

    Even if you are closing a connection without using the try/catch/finally block, the connection will not get closed if an exception occurs.  However, if the close command is wrapped in a finally block, it will get closed.

    More in just on this topic:

    http://www.15seconds.com/issue/040830.htm

    MB

     

Viewing 5 posts - 31 through 34 (of 34 total)

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