DBAtlas · Database operations atlas

229: The SELECT/EXECUTE permission was denied on the object

SQL Server

What 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.

Open in DBAtlas →

More from this engine