Grant INDEX or REFERENCE Object Privilege to a Role Does Not Fail With ORA-01931 (Doc ID 1169723.1)

Last updated on NOVEMBER 10, 2016

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 11.2.0.2.0 - Release: 10.2 to 11.2
Information in this document applies to any platform.

Symptoms

  The below statement is supposed to fail with ORA-01931, but it appears to be successful:

 SQL> grant index on scott.emp to role1;


EXPECTED BEHAVIOR
-----------------------
Error: ORA 1931
Text: cannot grant UNLIMITED TABLESPACE, REFERENCES, or INDEX to a role
-------------------------------------------------------------------------------
Cause: The UNLIMITED TABLESPACE, REFERENCES, or INDEX privileges cannot be
granted to a role.
Action: Grant these privileges directly to the user.

STEPS
-----------------------
The issue can be reproduced using the following steps:

1. create role role;
2. grant index on scott.emp to role1;
Grant succeeded


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms