如何创建DBA ROLE

2014-11-24 08:58:38 · 作者: · 浏览: 1

本人一次碰到有人将数据库DBA ROLE删除掉了,惊奇之余 ,只好想办法恢复,经查找资料,终于完全恢复了DBA ROLE,现将恢复过程与大家共享:

用 sys/xxxx as sysdba登录sqlplus,然后执行下列语句:

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 the
$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