Skip to content

How to Resolve ORA-65094: invalid local user or role name

  • by

ORA-65094

Tried to create a common user in the root container (CDB), but it failed with ORA-65094.

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT
SQL> create user c##hr container=current;
create user c##hr container=current
            *
ERROR at line 1:
ORA-65094: invalid local user or role name

ORA-65094 means that the common user cannot be created with CONTAINER=CURRENT, it violates the creation of a common user in root container.

Solution

You have two options, you can skip CONTAINER clause or set ALL to it.

1. Skip CONTAINER Clause

If CONTAINER Clause is ignored in the statement, Oracle will use the default scope, which is, CONTAINER=ALL.

SQL> create user c##hr;

User created.

2. Set CONTAINER=ALL

You can also explicitly declare CONTAINER=ALL in the statement.

SQL> create user c##hr container=all;

User created.

ORA-65094 is solved.

To able to create a local user in the root container, you may refer to: Hidden Parameter _ORACLE_SCRIPT Issue.

Leave a Reply

Your email address will not be published.