229: The SELECT/EXECUTE permission was denied on the object
SQL ServerWhat does it mean?
The user has no permission to perform the requested operation (SELECT, INSERT, EXECUTE etc.) on the object. Access was denied for security reasons.
Why does it happen?
The required permission was not granted to the user/role, wrong schema ownership (broken ownership chaining), an explicit DENY on the object, or the user not being a member of a sufficient role.
How to fix it
Grant the required permission: GRANT SELECT ON dbo.MyTable TO UserName (or GRANT EXECUTE ON dbo.MyProcedure TO ...). Add the user to an appropriate role (e.g. db_datareader). Remove any explicit DENY. Arrange permissions according to the principle of least privilege. Audit existing permissions with sys.database_permissions.
More from this engine
- 9002The transaction log for database is full due to ...
- 1105Could not allocate space for object in database because the filegroup is full
- 208Invalid object name
- 4060Cannot open database requested by the login. The login failed
- 233A connection was successfully established with the server, but then an error occurred (no process is on the other end of the pipe)
- 823The operating system returned error to SQL Server during a read/write at offset in file (I/O error)
- 824SQL Server detected a logical consistency-based I/O error (page corruption)