Guidance Reqd Please - RDP disconnects without Server being configured to do anything

John Venables 1 Reputation point
2021-05-14T12:34:57.253+00:00

Hi All,

New user here, I built a new Windows 2016 server in our Test environment. I did not set RDP time limts when I built the server. However If I RDP the server and kick off a SQL script on one of our DB's that can take 2-3hours...at some time through the is process of me not watching the RDP session it will disconnect, killing the SQL script as well.

I had a look in Group Policy settings and all the time limit flags in Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits were all set to 'Not Confgured'

But something is set to disconnect idle sessions, i am assuming idle session means my RDP session is idle, even though the server is running a script in SQL

I have no issues it disconnecting the RDP session as long as it keeps the process running and when i log back in SQL management studio will still be on the screen and running the script.

Any guidance would be appreciated

Regards

John

Any guidance would be appreciated.

Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,318 questions
Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,140 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Andy YOU 3,061 Reputation points
    2021-05-17T02:44:29.957+00:00

    HI JohnVenables-6931,

    1.Did you install RD session host role on this w2016 server?

    2.Is there RD gateway server and RD broker server in your RDS environment?

    3.Could you please enter below command then check if there is any policy about time limit of session?
    gpresult /h c:\rds.html

    4.Please run below command on w2016 and find the session id.
    query session

    5.Go to eventviewer and find terminalservice-localsessionmanager-operational
    then filter event id 40 and find which reason code of your session has been disconnected.

    6.Please check the reason why your session has been disconnected.
    Remote Desktop Client Troubleshooting: Disconnect Codes and Reasons
    https://social.technet.microsoft.com/wiki/contents/articles/37870.remote-desktop-client-troubleshooting-disconnect-codes-and-reasons.aspx

    ============================================
    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Andy YOU 3,061 Reputation points
    2021-05-31T01:40:02.167+00:00

    HI JohnVenables-6931,

    Is there anything to help you?

    ============================================
    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Andy YOU 3,061 Reputation points
    2021-06-09T06:39:31.567+00:00

    HI JohnVenables-6931,

    Is there anything to help you?

    ============================================
    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments