Gateway Error - SqlException - The INSERT permission was denied on the object 'RemoteSession'
Hi everyone,
Today I upgraded our Devolutions infrastructure to newer versions (see end of post). Since then, we encounter a weird issue with the Gateway.
Whenever you launch a new connection, the following error is generated:
Error:
SqlException - The INSERT permission was denied on the object 'RemoteSession', database 'MY_REDACTED_DATABASE_HERE', schema 'dbo'. at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception...
This happens when I use the credentials for the Runner account on the DVLS server. Which has been the case for the last ...forever.
I switch to the Owner account only when I need to update the system. After that, I jump back to using the Runner account.
And this worked like that for the last year or so, with no errors.
What am I missing?
Current versions:
Devolutions Server Console: 2025.3.5.0
Devolutions Server Instance: 2025.3.5.0
Devolutions Gateway: 2025.3.2
Remote Desktop Manager: 2025.3.20.0 64-bit
Database running on a dedicated SQL cluster with SQL Server authentication.
Recommended Answer
Hello,
Thank you for your feedback.
The permissions script is missing the INSERT permission on the RemoteSession table for the Scheduler account. You can use the following query to grant the missing permission. Replace the Scheduler username in the UserName variable below.
DECLARE @UserName varchar(150) SET @UserName = 'SchedulerUsernameHere' 'GRANT INSERT ON dbo.RemoteSession TO [' + @UserName + ']'
Let us know if that helps.
Best regards,
Érica Poirier
Hello,
Thank you for your feedback.
The permissions script is missing the INSERT permission on the RemoteSession table for the Scheduler account. You can use the following query to grant the missing permission. Replace the Scheduler username in the UserName variable below.
DECLARE @UserName varchar(150) SET @UserName = 'SchedulerUsernameHere' 'GRANT INSERT ON dbo.RemoteSession TO [' + @UserName + ']'
Let us know if that helps.
Best regards,
Érica Poirier
Hi Erica,
Thank you for your feedback!
I was able to test now and I can confirm that now it works correctly.
Thanks a lot for your help and for responding so quickly to my issue!
Wish you a wonderful day!
All the best,
Victor.
Hello Victor,
Thank you for your feedback. I'm glad the provided solution solved your issue.
Best regards,
Érica Poirier
Hi,
Thank you for reporting this issue.
We’ve included a fix in our 2025.3.7.0 release.
Best regards,
Marc-Andre Bouchard