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.
select * from sys.database_principals where name = 'UserName'
return? And is your server using a case-sensitive collation? – Pondlife