Hello Denis,
In addition to Ashok's solution. You can check this :
https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/2311/upgrade-migrate/upgrade#ensure-that-you-have-proper-permissions
and this chart: https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/2311/technical-overview/databases
So yes, make sure the user you use to update the database is part of both groups.
Regards,
François BIAUCE