Why do my queries lose connection?

  • I've used SSMS for many years (currently v18.12.1) and only in the last few months have I seen this problem.

    I tend to open SSMS at the start of the working week and close it down at the end (5 days later).  During that time I might open a dozen or more query windows and previously these have all retained their connections during the working week without timing out/losing connectivity.  I'm now finding that after a certain amount of time (I don't know exactly how long, but less than 8 hours) the connection is lost:

    image_2023-06-15_145145954

    I've looked around for settings that might prevent this happening but this is the only one that seems relevant:

    image_2023-06-15_150210179

    This isn't a dealbreaker but it's very frustrating and wastes time and mental bandwidth.  It could be a company-mandated setting (the company I work for has become increasingly security-conscious, although I can't imagine what the implications could be for me retaining connected query windows) but I suppose it could also be a setting in SSMS that I haven't seen before.

    • This topic was modified 1 year, 5 months ago by  edwardwill.
  • Sounds to me like some connection zealot wrote a proc to drop all sleeping connections every night.

    --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)

  • It's been mentioned to me that it might be a by-product of the PC going into stand-by mode; previously I've merely locked my PC overnight or when I'm away from my desk.  Truth told it's only a minor inconvenience, but a lot of minor inconveniences add up ...

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

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