Msg 15151 Level 16 State 1 Line 1 Cannot find the user ‘username’ because it does not exist or you do not have permission.

Posted on : 29-05-2012 | By : Devi Prasad | In : Msg 15151

0




Msg 15151, Level 16, State 1, Line 1
Cannot find the user ‘username’, because it does not exist or you do not have permission.

Example:

GRANT EXECUTE ON OBJECT::dbo.test to username

Fix/resolution:

– Check if the user exists

SELECT * FROM sys.server_principals WHERE name = N'username'

– Check if the stored procedure exists

SELECT * FROM sys.procedures WHERE name = N'test'

– Make sure that the query is being executed in the database in which the stored procedure exists




Reference : Devi Prasad (sqlserverlearner.com)

Do you like my blog?

If you liked reading this blog, please help spread the word by sharing this blog with your friends.



Need Help On SQL Server?

Cannot Find Solution to your problem (or) If you are looking for some help on SQL Server. Dont worry Click Here to Post your question and solve your issue.




Your Ad Here


Tags: ,