ORA-65175
Tried to grant SYSDBA privilege to SYSTEM, but it failed with ORA-65175.
SQL> show user
USER is "SYS"
SQL> grant sysdba to system;
grant sysdba to system
*
ERROR at line 1:
ORA-65175: cannot grant SYSDBA privilege locally in the root
ORA-65175 means that you cannot grant SYSDBA to an user only in the root container, which means, you should grant it globally or in a PDB.
Let's see what container we are currently in.
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
Solutions
Now we have 2 options to solve ORA-65175.
Grant SYSDBA in CDB
In a root container, we should grant SYSDBA privilege to a common user like SYSTEM globally, that is, CONTAINER=ALL.
SQL> grant sysdba to system container=all;
Grant succeeded.
Please note that, common user in a multitenant database has been redefined very differently from our sense. That's why we should grant it with CONTAINER=ALL.
Grant SYSDBA in PDB
That's right, we can grant SYSDBA privilege in a PDB only.
Let's switch to the PDB first.
SQL> show user
USER is "SYS"
SQL> alter session set container=orclpdb;
Session altered.
Then we grant SYSDBA privilege to the user.
SQL> grant sysdba to system;
Grant succeeded.
We solved it.