Find time it takes to open a connection

  • Good day -

    I work with a developer that has a theory that when the time it takes to open a connection to a DB increases, this is an indicator of a future issue with our application. I would like to also track this, to either confirm or dispute the theory. I have read that connection times tend to be longer on SQL 2005 boxes, and that is something I can work with. What I want to do is track (in a table) the time it takes to open a connection to various sql servers (odbc, native SQL, does not matter) and log the time it took.

    Does anyone know of a good way to set this up? I would prefer a T-SQL solution, if possible...

    Cory

    -- Cory

  • How can you do this in T-SQL? The time to open a connection comes from when the client starts trying. The server has no idea of this time if there are network delays or if it's busy.

    Run two time values (right before and after connecting) and then store this in a table as the first query submitted.

Viewing 2 posts - 1 through 1 (of 1 total)

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