Cannot find the user 'foraydbadmin', because it does not exist or you do not have permission.
Problem
An error occurs trying to install or upgrade Foray ADAMS. The error includes the following:
Cannot find the user 'foraydbadmin', because it does not exist or you do not have permission.
This error may occur when trying to execute the following command on a Microsoft SQL Server database.
GRANT SUBSCRIBE QUERY NOTIFICATIONS TO foraydbadmin
The error may also appear as:
Error communicating with the database.DB Transaction Failed. Command = GRANT SUBSCRIBE QUERY NOTIFICATIONS TO foraydbadmindevClick Cancel to exit the application
Solution
This error can occur when the foraydbadmin account has not been explicitly added to the database.
Open Microsoft SQL Server Management Studio
Databases > ForayAdams > Security > Users
If you do not see foraydbadmin under the list of users then this is the issue
Right-click dbo and select Properties
Make sure the Login name is not foraydbadmin. If it is then:
Open a query window
Execute the command
ALTER AUTHORIZATION ON DATABASE::[ForayAdams] TO [sa];
This will change the dbo login from foraydbadmin to sa
Right-click Users and select New User…
General page:
User name: foraydbadmin
Login name: foraydbadmin
Default schema: dbo
Membership page:
db_datareader
db_datawriter
db_owner
OK
Now that the foraydbadmin account has been explicitly added to the database it will be able to find the user when performing actions such as granting permissons.
Related articles
Related content
© 2023 Foray, LLC - All Rights Reserved