Open Forum

Expand all | Collapse all

Users not Logging Out

  • 1.  Users not Logging Out

    Posted Jan 23, 2018 06:51 PM
    We have a user the claims she log out of GP everyday.  When I look at the user activity, quite often the system shows that  been logged on for a few days.   Has anyone experienced user logins getting stuck?   She has the same problem with the service software that we use.   None of my other users are having this problem in either software.

    Thank you,

    Laura

    ------------------------------
    Laura Mitchell
    Entek Corporation
    Longview WA
    ------------------------------


  • 2.  RE: Users not Logging Out

    GPUG ALL STAR
    Posted Jan 24, 2018 07:48 AM
    Hi Laura,
    How is that user accessing GP ? is there a local client installed on her workstation or does she access it thru a Citrx / Terminal server instance ?
    It is quite common that users claim they "close" their GP application properly when accessing it remotely, but in reality they are only closing the remote connection, and not the actual GP session on the server..
    If it's a local GP client, than I'd try to watch how she does close the application more closely and check the ACTIVITY table at the same time..
    Either something is force closing the apps without proper logoff, or she is not exiting GP the proper way..
    Do you have any 3rd-party ISV product that could interfere with the client and prevent proper shutdown ?

    ------------------------------
    Beat Bucher
    Business Analyst, Dynamics GP MVP
    Ultra-Electronics Forensic Technology Inc.
    Montreal QC/Canada
    @GP_Beat http://dyngpbeat.wordpress.com/
    Montreal QC GPUG Chapter Leader
    GP2013R2 / MR2012 CU14
    ------------------------------



  • 3.  RE: Users not Logging Out

    Posted Jan 24, 2018 08:30 AM
    ​We were having that issue, and found that they were using the X in the upper right corner instead of going to Microsoft Dynamics GP drop down then exit.  When using the X sometimes it logs the user out sometimes it does not.  Going to Exit pretty much always works.  Hope that  helps.

    ------------------------------
    Natalia Powell
    RREMC Restaurants, LLC
    West Palm Beach FL
    ------------------------------



  • 4.  RE: Users not Logging Out

    Posted Jan 24, 2018 08:38 AM
    Hi Laura, I have had that happen where they swear they have logged out.  I ask them to show me what they are doing to log out and almost all of the time they are simply using the x at the top of screen thinking that is how they should log out.

    ------------------------------
    Gary Galloway
    Accounting Manager
    LaRosa's, Inc.
    Cincinnati OH
    ------------------------------



  • 5.  RE: Users not Logging Out

    GPUG ALL STAR
    Posted Jan 24, 2018 09:42 AM
    Hi @Laura Mitchell

    Here is a link to a discussion on this topic that had a lot of activity Exiting GP

    What I've started to do is add the 'Exit' button to the toolbar.  It's the same as Microsoft Dynamics GP > Exit



    ------------------------------
    Frank Heslin
    Financial Systems Administrator
    ExamWorks, Inc.
    Atlanta GA

    GPUG Advisory Committee Member
    Summit Track Leader
    GPUG All Star 2016

    GP2015 R2
    MR CU14
    ------------------------------



  • 6.  RE: Users not Logging Out

    Posted Jan 24, 2018 07:11 PM
    As other members have inputted, it is most likely the user clicking "x" and disconcerting the remote desktop session instead of logging out completely. We've had this problem as well and implemented the following stored procedure to run as a sql agent job. It looks at the user's sql server processes and will log the user off if that user has been idle for too long. Perhaps this will be useful to you and may be something you run in the middle of the night so the users table is cleared for idle users. You will need to change the section for the sql email profile to reflect an actual profile setup on your sql server as well as the recipient email address parameters to reflect your company's email domain. The idle time we used was > 60 minutes but that can be changed as well. It should format cleanly if you paste into sql management studio. G'luck



    -- =============================================-- Author: Craig Fuller-- Create date: 05/10/12-- Description: Idle Users - Checks for idle GP users, sends email notices, finally removes them from ACTIVITY-- =============================================CREATE PROCEDURE [dbo].[IdleGPUsers] ASBEGIN
    SET NOCOUNT ON;
    DECLARE @IDLE_TIME INT, @USERID CHAR(15), @CMPNYNAM CHAR(65), @recipient VARCHAR(255), @emailbody VARCHAR(255), @emailsubject VARCHAR(255)DECLARE @profile varchar(50)SET @profile = 'helpdesk profile'
    DECLARE idletime_cursor CURSOR FORSELECTCASE WHEN DATEDIFF(mi, P.last_batch, GETDATE()) > 1 THEN DATEDIFF(mi, P.last_batch, GETDATE()) ELSE 0END AS IDLE_TIME,A.USERID, A.CMPNYNAMFROM DYNAMICS..ACTIVITY ALEFT JOIN DYNAMICS..SY01500 C ON A.CMPNYNAM = C.CMPNYNAMLEFT JOIN tempdb..DEX_SESSION S ON A.SQLSESID = S.session_idLEFT JOIN master..sysprocesses P ON S.sqlsvr_spid = P.spidAND ecid = 0WHERE DATEDIFF(mi, P.last_batch, GETDATE()) >= 60 AND C.INTERID = 'TM99'
    OPEN idletime_cursorFETCH NEXT FROM idletime_cursor INTO @IDLE_TIME, @USERID, @CMPNYNAM
    WHILE @@FETCH_STATUS = 0BEGIN IF @IDLE_TIME >= 60 and @IDLE_TIME < 62 begin IF (SELECT COUNT(*) FROM TM99..TM_IDLEUSER_EXEMPTIONS T WHERE T.GPUSERID = @USERID AND T.EVENTTYPE = 'idle') = 0 /** no idle user exemption rule **/ /** uncomment the following text for testing : AND @USERID = 'cfuller' **/
    begin SET @recipient = RTRIM(@USERID) + '@twinmed.com' SET @emailbody = 'Your Dynamics GP session has been idle for ' + CAST(@IDLE_TIME AS varchar(10)) + ' minutes.  Please logoff when not actively using Dynamics.' SET @emailsubject = 'IDLE GP SESSION - ' + RTRIM(@CMPNYNAM) exec msdb.dbo.sp_send_dbmail @profile_name=@profile, @recipients=@recipient, @body=@emailbody, @subject=@emailsubject; IF (SELECT COUNT(*) FROM DYNAMICS..SY00800 S WHERE S.USERID = @USERID) > 0 INSERT INTO TM99..TM_IDLEUSER_EVENTS SELECT @USERID,GETDATE(),@IDLE_TIME,'idle',WINTYPE,BCHSOURC,BACHNUMB,POSTING,TRXSOURC,DEX_ROW_ID FROM DYNAMICS..SY00800 S WHERE S.USERID = @USERID ELSE INSERT INTO TM99..TM_IDLEUSER_EVENTS SELECT @USERID,GETDATE(),@IDLE_TIME,'idle',NULL,NULL,NULL,NULL,NULL,NULL end end IF @IDLE_TIME >= 120 and @IDLE_TIME < 124 begin /** first check to see if in a posting state **/ IF (SELECT COUNT(*) FROM DYNAMICS..SY00800 S WHERE S.USERID = @USERID AND POSTING = 1)> 0 begin SET @recipient = 'email@company.com' SET @emailbody = @USERID + ' has a Dynamics GP session that has been inactive for ' + CAST(@IDLE_TIME AS varchar(10)) + ' minutes that appears to be in a posting state.  The user will not be deleted from the ACTIVITY table.' SET @emailsubject = 'INACTIVE POSTING SESSION - ' + RTRIM(@CMPNYNAM) exec msdb.dbo.sp_send_dbmail @profile_name=@profile, @recipients=@recipient, @body=@emailbody, @subject=@emailsubject; INSERT INTO TM99..TM_IDLEUSER_EVENTS SELECT @USERID,GETDATE(),@IDLE_TIME,'expired',WINTYPE,BCHSOURC,BACHNUMB,POSTING,TRXSOURC,DEX_ROW_ID FROM DYNAMICS..SY00800 S WHERE S.USERID = @USERID end else /** not in a posting state **/ IF (SELECT COUNT(*) FROM TM99..TM_IDLEUSER_EXEMPTIONS T WHERE T.GPUSERID = @USERID AND T.EVENTTYPE = 'expired') = 0 /** no idle user exemption rule **/ /** uncomment the following text for testing : AND @USERID = 'cfuller' **/ begin SET @recipient = RTRIM(@USERID) + '@company.com' SET @emailbody = 'Your Dynamics GP session has expired due to inactivity for ' + CAST(@IDLE_TIME AS varchar(10)) + ' minutes.  You will need to close, then restart your Dynamics GP session.' SET @emailsubject = 'EXPIRED GP SESSION - ' + RTRIM(@CMPNYNAM) exec msdb.dbo.sp_send_dbmail @profile_name=@profile, @recipients=@recipient, @body=@emailbody, @subject=@emailsubject; IF (SELECT COUNT(*) FROM DYNAMICS..SY00800 S WHERE S.USERID = @USERID) > 0 INSERT INTO TM99..TM_IDLEUSER_EVENTS SELECT @USERID,GETDATE(),@IDLE_TIME,'expired',WINTYPE,BCHSOURC,BACHNUMB,POSTING,TRXSOURC,DEX_ROW_ID FROM DYNAMICS..SY00800 S WHERE S.USERID = @USERID ELSE INSERT INTO TM99..TM_IDLEUSER_EVENTS SELECT @USERID,GETDATE(),@IDLE_TIME,'expired',NULL,NULL,NULL,NULL,NULL,NULL --NOW DELETE ACTIVITY RECORD-- DELETE DYNAMICS..ACTIVITY WHERE USERID = @USERID AND CMPNYNAM = @CMPNYNAM end end FETCH NEXT FROM idletime_cursor INTO @IDLE_TIME, @USERID, @CMPNYNAMENDCLOSE idletime_cursor;DEALLOCATE idletime_cursor;
    /** Update the peak user count table for license managing **/DECLARE @CURRDATE DATEDECLARE @CURRUSERCOUNT INTSET @CURRUSERCOUNT = (SELECT COUNT(*) FROM DYNAMICS..ACTIVITY A LEFT JOIN DYNAMICS..SY01400 U ON A.USERID = U.USERID LEFT JOIN DYNAMICS..SY01500 C ON A.CMPNYNAM = C.CMPNYNAM LEFT JOIN tempdb..DEX_SESSION S ON A.SQLSESID = S.session_id LEFT JOIN master..sysprocesses P ON S.sqlsvr_spid = P.spid AND ecid = 0 LEFT JOIN master..sysdatabases D ON P.dbid = D.dbid )SET @CURRDATE = CAST(CAST(DATEPART(MONTH,GETDATE())AS CHAR(2)) + '/' + CAST(DATEPART(DAY,GETDATE())AS CHAR(2)) + '/' + CAST(DATEPART(YEAR,GETDATE())AS CHAR(4))AS DATE)IF EXISTS (SELECT PEAKGPUSERCOUNT FROM TM_GPPEAKUSERCOUNT WHERE CALDATE = @CURRDATE) BEGIN IF (SELECT PEAKGPUSERCOUNT FROM TM_GPPEAKUSERCOUNT WHERE CALDATE = @CURRDATE) < @CURRUSERCOUNT UPDATE TM_GPPEAKUSERCOUNT SET PEAKGPUSERCOUNT = @CURRUSERCOUNT WHERE CALDATE = @CURRDATE ENDELSE INSERT INTO TM_GPPEAKUSERCOUNT (CALDATE,PEAKGPUSERCOUNT) SELECT @CURRDATE,@CURRUSERCOUNT/** complete peak user update **/
    END

    ------------------------------
    Johnny Lin
    Vice President - IT
    Twin Med, LLC.
    Santa Fe Springs CA
    ------------------------------



  • 7.  RE: Users not Logging Out

    Posted Jan 26, 2018 01:55 PM
    In all respect, I don't think that Johnny Lin solution will work. Most of the time, the GP application will poll SQL Server on a regular basis thus the user will still be seen as active and the license will never be freed up.

    That's one of the reason why we have developed a license manager. It detects activity on the client side allows you to configure a disconnect timeout where we will properly close GP and free up the license.

    If you need more detail you can contact me.


    ------------------------------
    Guillaume Simard
    Negotium Technologies Inc.
    Montréal QC
    ------------------------------



  • 8.  RE: Users not Logging Out

    SILVER CONTRIBUTOR
    Posted Jan 25, 2020 08:56 AM
    Can you provide the details of the License Manager as you mentioned above.

    ------------------------------
    Mark Roark
    Infrastructure Supervisor
    Global Products, Inc.
    ------------------------------



  • 9.  RE: Users not Logging Out

    GPUG ALL STAR
    Posted Jan 27, 2020 01:27 AM
    @Mark Roark

    Please check out GP Power Tools. It has features for managing licenses.
    https://winthropdc.wordpress.com/2019/02/13/gppt-managing-user-licenses-with-gp-power-tools/

    https://winthropdc.wordpress.com/2019/02/13/gppt-automatic-logout-for-microsoft-dynamics-gp/

    Regards

    David

    ------------------------------
    David Musgrave MVP, GPUG All-Star

    Managing Director
    Winthrop Development Consultants

    Perth, Western Australia

    http://www.winthropdc.com
    ------------------------------



  • 10.  RE: Users not Logging Out

    Posted Jan 27, 2020 02:15 PM
    Hi Mark-

    Other solutions available include GP PowerPack/Login Monitor, by WilloWare: https://willoware.com/gp-powerpack-login-monitor/ , and Inactivity Time Out, from Rockton Software's Dynamics GP Toolbox. There are many options available to assist in managing GP User Licenses.

    Best regards,
    Dee Dee Rea
    WilloWare Inc.

    ------------------------------
    Dee Dee Rea
    WilloWare, Inc.
    Wapella IL
    ------------------------------



  • 11.  RE: Users not Logging Out

    SILVER CONTRIBUTOR
    Posted Jan 27, 2020 04:29 PM
      |   view attached
    I'm using a homegrown solution I created over 10 years ago. I implemented it for a number of my clients when I was consulting, and still use it today in my current gig as a GP admin.

    Our company has 65 users in GP (DYNAMICS..SY01400), not including DYNSA and sa, and our GP license is for 30 users. Our users are in 12 different time zones around the world, and all users access GP 2016 R2 on a Terminal Server via Remote Desktop Services (RDS).

    I created SQL jobs that do the following:

    1. Twice a day (7am and 7pm UTC) check for users that have been longer than a defined threshold (currently I'm using 12 hours), record their UserID, Login date and time, and GP Company they are in to a SQL table, and if they do not have a GP window open (no record in SY00800), delete the user from the ACTIVITY and SY00801 table, then deletes orphaned records from DEX_SESSION and DEX_LOCK.

    2. Every 15 minutes 24/7 I record both the number of active and distinct users to a SQL table. I query this table when we are discussing implementing a new module or application where more users may be needed.

    I haven't had any complaints about users not being able to log in due to all licenses being in use, nor have I needed to implement the feature in GP Power Tools (love that product!) that limits the number of companies a user can be logged into at one time, but I know it's available if I need to use it.

    Attached is the script I used to create a table and stored procedure for number 1 above. The script executes against a database I use called DB_Utilities, but you can change it for your own environment.

    ------------------------------
    Jeff Pfershy
    Sr Business Analyst
    BluJay Solutions Inc
    Holland MI
    ------------------------------

    Attachment(s)



  • 12.  RE: Users not Logging Out

    Posted Feb 03, 2020 10:23 AM
    The problem I found was that our users would have an open window.  Especially the users who primarily use only one screen such as our Purchasing department.  They would leave the enter PO window open and we had sessions started months earlier left in the database even through their Citrix session was closed out due to inactivity weeks earlier.

    The Rockton solutions did the same thing.  They would soft close user sessions.  So if a user was logged in but had no open windows and was just sitting at the home page, Rockton will close the session.  I pushed for the GP Power Tools to have the option to do hard closes.  Where if there no activity even if there was a window such as the PO Entry screen open that the session would be removed.  And there is the option to put in the number of hours of inactivity (same as Rockton) to close a session but GP Power tools adds the ability to have the sessions cleared out quicker when you reach a percentage of licenses used so that when many users want in, the time inactive becomes shorter before being closed.  And GP Power Tools gives you an on screen message that you are about to be logged out if you truly there with unsaved changes.

    ------------------------------
    Bill Jones
    Systems Engineer, Financial Systems
    Universal Service Administrative Company
    Washington DC
    ------------------------------



  • 13.  RE: Users not Logging Out

    GPUG ALL STAR
    Posted Feb 03, 2020 11:52 AM
    @Bill Jones ​​

    I originally developed the Inactivity Timeout in Rockton's product as part of my Omni Tools from my pre Microsoft days as Winthrop Dexterity Consultants.

    The newer Automatic Logout in GP Power Tools is a better than my original design. As well as the features you mentioned, it also includes a smart save option which will save unsaved work and close the windows. Only an unsaved window that does not have all the required fields entered will prevent a successful logout due to a Save dialog popping up.

    Hope that helps

    David

    ------------------------------
    David Musgrave MVP, GPUG All-Star

    Managing Director
    Winthrop Development Consultants

    Perth, Western Australia

    http://www.winthropdc.com
    ------------------------------



  • 14.  RE: Users not Logging Out

    Posted Feb 20, 2020 03:59 PM
    Our product does not just free up licenses (both soft and hard methods) but also lets you reserve and limit the number of licences available for different departments.

    Please contact us for more details : Dynamics GP License Manager

    ------------------------------
    Guillaume Simard
    InMind Technologies
    Montréal QC
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role