VPN and Remote Desktop - Dropped Connection

  • If I'm off site and using VPN to connect to the office, and then use Remote Desktop onto a server to run some SQL code, what happens if the VPN drops ?? If I log back in to VPN, then I have to log into the server again and the existing session is gone. Would theSQL code that was running get killed ?? What if there were 10 update statements running, and the connection dropped during update #5 ?

    I know that if I intentionally close the remote desktop session, then when I log back in the session is still active but a dropped connection seems different.

  • Chances are You'll get your session back if only VPN connection broke down.

    Let's assume that you're working from Home...using VPN to access your office system.....and using your office system client tools connected to SQL Box and running 10 updates.

    Case1 : If your home PC Connectivity broke from your office system .......it can be your ISP fault, VPN fault or x y z. you'll definately get your session back, and if you ran all the updates at once and you're waiting for the result, all updates will be executed nomatters on which update statement your link broke.

    Case2 : If Connectivity broke down b\w your office system and your SQL Box

    all updates were in a explicit transaction : they'll rollback.

    all updates were not a part of any explicit transaction: the update which was not yet completed will be rolledback, but previous updates were implicit transaction so theyve already committed.

    If we talk about your session you'll again get the session but there are many IFs and BUTs to it.

    Regards,
    Sarabpreet Singh 😎
    Sarabpreet.com
    SQLChamp.com
    Twitter: @Sarab_SQLGeek

  • I have had this happen where I connect to a new session on my next login to the server. Check Terminal Services Manager and see ifyour old session is still there. If so, you can connect back to that session from the Term Services Mgr window by right-clicking on the old session and clicking connect.

    You'll wind up tying up two sessions on the server while you do that, but I have had that happen more than once to me.

    Best of luck,

    Steve

  • SK (8/23/2009)


    I have had this happen where I connect to a new session on my next login to the server. Check Terminal Services Manager and see ifyour old session is still there. If so, you can connect back to that session from the Term Services Mgr window by right-clicking on the old session and clicking connect.

    You'll wind up tying up two sessions on the server while you do that, but I have had that happen more than once to me.

    Best of luck,

    Steve

    Good Idea, thanks !

  • You can set the default policy to restrict each user to only one session on the TS box. The setting is called "Restrict Terminal Services users to a single remote session" in the Group Policy editor under Computer Configuration > Windows Components > Terminal Services (if you're setting this at a domain level) or "Restrict each user to one session" (if you're setting it for a specific server using Terminal Services Configuration).

    With this setting enabled you will automatically be reconnected to you previous session if you close it (without logging off) or get disconnected.

    If you don't have privileges to do this, ask your Sysadmin to hook you up since this can be invaluable when executing long-running queries in a VPN session.

    Note also, that most TS configs set a default timeout under which a session will be logged off (rather than simply closed); usually this is set somewhere in the 24 hour range, so it may not be pertinent, but if this occurs the original session won't be available on reconnect.

    Hope this helps.

  • You can set the default policy to restrict each user to only one session on the TS box. The setting is called "Restrict Terminal Services users to a single remote session" in the Group Policy editor under Computer Configuration > Windows Components > Terminal Services (if you're setting this at a domain level) or "Restrict each user to one session" (if you're setting it for a specific server using Terminal Services Configuration).

    With this setting enabled you will automatically be reconnected to you previous session if you close it (without logging off) or get disconnected.

    Good info, I will look into that. Thanks!

    Steve

Viewing 6 posts - 1 through 5 (of 5 total)

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