I was surprised when someone deleted the database dba role, so I had to find a way to recover it. After searching for information, I finally completely restored the dba role. Now I will share the recovery process with you:
Use sys/xxxx as sysdba to log on to sqlplus and then execute the following statements:
SQL> create role dba;
SQL> grant all PRivileges to dba with admin option;
SQL> grant select_catalog_role to dba with admin option;
SQL> grant execute_catalog_role to dba with admin option;
SQL> grant delete_catalog_role to dba with admin option;
EXPlanation:
================
The DBA role is created at database creation time by the "SQL. bsq" script. (The "SQL. bsq" script is typically found in the $ Oracle_HOME/dbs or
$ ORACLE_HOME/rdbms/admin Directory .)
Additional grants are made to dba through other scripts in the admin directory.
For example, exp_full_database and imp_full_database in catexp. SQL.
The above commands are excerpts from the "SQL. bsq" script