SQL Server error 229: "The SELECT permission was denied on the object"
Resolved SQL
BG
Beth Gibson
October 20, 2026
2 replies
2,434 views
Reviewed by moderators
2 participants

A user gets error 229, The SELECT permission was denied on the object 'Customers', database 'Sales', schema 'dbo'. How do I fix it the right way?

Accepted answer
Marked as the solution to this question

The user lacks SELECT on that object. Check how he gets access first.

1. Find the user in the database and see roles and explicit permissions: EXEC sp_helprotect @username = 'user';.
2. Check for an explicit DENY. A DENY always beats a GRANT, including through roles. Remove it with REVOKE.
3. Grant what is needed. Better to grant a role than a user: GRANT SELECT ON dbo.Customers TO reporting_role; and add the user to the role with ALTER ROLE reporting_role ADD MEMBER [user];.

Avoid fixing this by making the user db_owner. Give the least permission that the job needs. If the user is a login without a database user, create the user with CREATE USER [user] FOR LOGIN [user]; first.

An old DENY was there. Removed and granted the role. Thanks.