Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find the user '', because it does not exist or you do not have permission

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.

like image 507
Mathematics Avatar asked Apr 16 '13 15:04

Mathematics


1 Answers

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'.

like image 95
Daniele Torino Avatar answered Sep 25 '22 07:09

Daniele Torino