Quantcast
Channel: SQL Errors – SQLSERVERLEARNER
Viewing all articles
Browse latest Browse all 74

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

$
0
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


Viewing all articles
Browse latest Browse all 74

Trending Articles