SQL SERVER 2012

I have 2 windows server 2012 ,both are SQL server lately I am having problem, I am losing the session

next time when I connect, its new (as if restarted the system, without any programs showing which I was previously working on, in fact we are experiencing server resets, losing code, queries scripts.

can u please help. we are trying to RDP into server
pramod1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
Failing hard drive on server?  That is if nothing is saved.. but if it is just a new session after a session was disconnected then the server administrator has to set the reconnection  properties  If there is Remote Desktop Services installed.

To specify timeout and reconnection settings for a remote session
    On the RD Session Host server, open Remote Desktop Session Host Configuration. To open Remote Desktop Session Host Configuration, click Start, point to Administrative Tools, point to Remote Desktop Services, and then click Remote Desktop Session Host Configuration.
Under Connections, right-click the name of the connection, and then click Properties.

Further information is available @ https://technet.microsoft.com/en-us/library/cc754272.aspx?f=255&MSPPError=-2147217396
In the Properties dialog box for the connection, on the Sessions tab, select the following options as necessary: Select the Override user settings check box, and then set timeout settings for End a disconnected session, Active session limit, and Idle session limit.
Select the Override user settings check box, and then select one of the following reconnection settings: Disconnect from session or End session. Click OK. Changes to timeout and reconnection settings are not applied to sessions that are connected when the change is made. The changes will take effect the next time the user establishes a new connection to the RD Session Host server.
You can also configure timeout and reconnection settings by applying the following Group Policy settings:
   Set time limit for disconnected sessions
    Set time limit for active but idle Remote Desktop Services sessions
    Set time limit for active Remote Desktop Services sessions
    Terminate session when time limits are reached

These Group Policy settings are located in the following locations:
 Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits
User Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits

These Group Policy settings can be configured by using either the Local Group Policy Editor or the Group Policy Management Console (GPMC).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Eugene ZCommented:
Could you please clarify your problem?
starting from your OS windows server 2012 patching level, edition.?
is it R2?  !make sure you have the latest OS patches! ->> jut this may help you
what is your sql server version\edition\service pack\patch ?
/..it is good to have a latest patches as well/

---about your issue:
<I am losing the session>
if it is RDP -- please check your setting as per above David post
and try to use your PC SSMS  instead of server RDP and save your code as .sql\DB objects\TFS..
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.