I am trying to add permissions to a Store procedure for a user using this query,
USE [MyDatabaseName] GO GRANT EXEC ON [dbo].[StoreProcedureName] TO [UserName] GO
I can give permissions to user through theUser Interface but using this query I get this error,
Cannot find the user 'UserName', because it does not exist or you do not have permission.
If I don't have permissions then how can I add permissions using User Interface.
I just encountered the same problem.
Make sure there is an user mapping for your login in the master table. No database role memberships are required, just tick 'Map' for the database master under 'User Mapping' in the properties for the login 'UserName'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With