question

JohnVenables-6931 avatar image
0 Votes"
JohnVenables-6931 asked JiaYou-MSFT edited

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

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.

remote-desktop-serviceswindows-server-2016
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

HI JohnVenables-6931,

Is there any progress on your question?

0 Votes 0 ·
JiaYou-MSFT avatar image
0 Votes"
JiaYou-MSFT answered JiaYou-MSFT commented

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.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

HI JohnVenables-6931,

Is there any progress on your question?

0 Votes 0 ·
JiaYou-MSFT avatar image
0 Votes"
JiaYou-MSFT answered JiaYou-MSFT edited

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JiaYou-MSFT avatar image
0 Votes"
JiaYou-MSFT answered

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.