Skip to content
Home » Oracle » How to Resolve ORA-01919: role does not exist

How to Resolve ORA-01919: role does not exist

ORA-01919

ORA-01919 means that Oracle cannot find any privilege you specified, so it turned to search for the name in roles, but still no luck.

Let's see some error patterns.

Invalid Privilege

Tried to grant a privilege to an user, but it failed with ORA-01919.

SQL> grant create_table to hr;
grant create_table to hr
      *
ERROR at line 1:
ORA-01919: role 'CREATE_TABLE' does not exist

In other words, the privilege you specified in the statement is neither a valid privilege, nor a valid role.

PLUSTRACE

For some cases, you might think the privilege or role is valid. We take PLUSTRACE as an example.

SQL> grant plustrace to hr;
grant plustrace to hr
      *
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist

Yes, PLUSTRACE is a valid role in Oracle database, but it needs to be installed! See the solution below.

Solution

Invalid Privilege

You should specify a valid privilege or valid role for the statement. In this case, we should use CREATE TABLE, not CREATE_TABLE.

SQL> grant create table to hr;

Grant succeeded.

PLUSTRACE

To solve ORA-01919 for role PLUSTRACE, we have to create and install PLUSTRACE role.

To know how to correctly grant privileges, we have some examples.

Leave a Reply

Your email address will not be published. Required fields are marked *