Inactivity Timeout Error: A remove range operation on table ‘SY_Current_Activity’ failed accessing SQL data.



Users who do not have access to all of the company databases are receiving the following error message after upgrading to GP 2015 R2 or a later version of GP:


A remove range operation on table ‘SY_Current_Activity’ failed accessing SQL data.


[Microsoft][SQL Server Native Client 11.0][SQL Server]The server principa “USERID” is not able to access the database “DATABASEID” under the current security context.




The reason for this is detailed in the blog article: Delete or Remove Range Errors on ‘SY_Current_Activity’ table after GP 2015 R2. Click here to review the information.


Click here for a blog that has useful information for Developers regarding this situation.




If you are experiencing this only with the Inactivity Timeout tool enabled, unmark the Inactivity Timeout’s Clear Stranded Activity User checkbox.


  1. Log into Microsoft Dynamics GP as sa. 
  2. Go to Microsoft Dynamics GP | Tools | Setup | Dynamics GP Toolbox | System Settings.
  3. Double click on Inactivity Timeout.
  4. Unmark the Clear Stranded Activity Records checkbox.
  5. Click OK, and then close the Dynamics GP Toolbox System Settings window.
  6. Log out of GP and then back into GP.



If a User ID is stuck in the Activity table due to their GP session ending and they are not at work to log back in and delete their stuck User ID through GP, you can delete their record from the ACTIVITY table in the DYNAMICS database in SQL Server Management Studio.