您的位置:首页 > 数据库 > Oracle

ORACLE DBA ROLE重建

2008-04-30 11:30 399 查看
           今天犯傻,不小心删除了,本来想revoke某个用户的DBA权限的!习惯用PLSQLDEVELOP的我,顺手在UI那里点了DROP!  汗,操作完之后,还不知道什么回事,切换SYSTEM登陆的时候发现没  CREATE SESSION权限,奇怪了! 后来想想才发现自己误操作了!郁闷啊!DROP ROLE了!晕死!           痛苦之下叫LIVING 帮忙查看DBA ROLE的SQL语句!哎!痛苦的重建了一个,首先需登陆SYS用户 然后执行一下SQL语句,如果有对象不存在则跳过就可以。

 


-- Create the role 


create role DBA;


-- Grant/Revoke object privileges 


grant execute on DBMS_DBVERIFY to DBA;


grant execute on DBMS_DEFER_QUERY to DBA;


grant execute on DBMS_DEFER_SYS to DBA;


grant execute on DBMS_FEATURE_USAGE to DBA;


grant execute on DBMS_FLASHBACK to DBA;


grant execute on DBMS_MONITOR to DBA;


grant execute on DBMS_RESUMABLE to DBA;


grant execute on DBMS_SERVER_ALERT to DBA;


grant execute on DBMS_SERVER_TRACE to DBA;


grant execute on DBMS_SERVICE to DBA;


grant execute on DBMS_STORAGE_MAP to DBA;


grant execute on DBMS_UADV_ARR to DBA;


grant execute on DBMS_UNDO_ADV to DBA;


grant execute on DBMS_WORKLOAD_REPOSITORY to DBA;


grant execute on LOAD_UNDO_STAT to DBA;


grant select, insert, update, delete, alter on MAP_OBJECT to DBA;


grant execute on OUTLN_EDIT_PKG to DBA;


grant execute on OUTLN_PKG to DBA;


grant execute on RESET_UNDO_STAT to DBA;


-- Grant/Revoke role privileges 


grant delete_catalog_role to DBA with admin option;


grant execute_catalog_role to DBA with admin option;


grant exp_full_database to DBA;


grant gather_system_statistics to DBA;


grant imp_full_database to DBA;


grant java_admin to DBA;


grant java_deploy to DBA;


grant olap_dba to DBA;


grant scheduler_admin to DBA with admin option;


grant select_catalog_role to DBA with admin option;


grant wm_admin_role to DBA;


grant xdbadmin to DBA;


-- Grant/Revoke system privileges 


grant administer any sql tuning set to DBA with admin option;


grant administer database trigger to DBA with admin option;


grant administer resource manager to DBA with admin option;


grant administer sql tuning set to DBA with admin option;


grant advisor to DBA with admin option;


grant alter any cluster to DBA with admin option;


grant alter any dimension to DBA with admin option;


grant alter any evaluation context to DBA with admin option;


grant alter any index to DBA with admin option;


grant alter any indextype to DBA with admin option;


grant alter any library to DBA with admin option;


grant alter any materialized view to DBA with admin option;


grant alter any outline to DBA with admin option;


grant alter any procedure to DBA with admin option;


grant alter any role to DBA with admin option;


grant alter any rule to DBA with admin option;


grant alter any rule set to DBA with admin option;


grant alter any sequence to DBA with admin option;


grant alter any sql profile to DBA with admin option;


grant alter any table to DBA with admin option;


grant alter any trigger to DBA with admin option;


grant alter any type to DBA with admin option;


grant alter database to DBA with admin option;


grant alter profile to DBA with admin option;


grant alter resource cost to DBA with admin option;


grant alter rollback segment to DBA with admin option;


grant alter session to DBA with admin option;


grant alter system to DBA with admin option;


grant alter tablespace to DBA with admin option;


grant alter user to DBA with admin option;


grant analyze any to DBA with admin option;


grant analyze any dictionary to DBA with admin option;


grant audit any to DBA with admin option;


grant audit system to DBA with admin option;


grant backup any table to DBA with admin option;


grant become user to DBA with admin option;


grant comment any table to DBA with admin option;


grant create any cluster to DBA with admin option;


grant create any context to DBA with admin option;


grant create any dimension to DBA with admin option;


grant create any directory to DBA with admin option;


grant create any evaluation context to DBA with admin option;


grant create any index to DBA with admin option;


grant create any indextype to DBA with admin option;


grant create any job to DBA with admin option;


grant create any library to DBA with admin option;


grant create any materialized view to DBA with admin option;


grant create any operator to DBA with admin option;


grant create any outline to DBA with admin option;


grant create any procedure to DBA with admin option;


grant create any rule to DBA with admin option;


grant create any rule set to DBA with admin option;


grant create any sequence to DBA with admin option;


grant create any sql profile to DBA with admin option;


grant create any synonym to DBA with admin option;


grant create any table to DBA with admin option;


grant create any trigger to DBA with admin option;


grant create any type to DBA with admin option;


grant create any view to DBA with admin option;


grant create cluster to DBA with admin option;


grant create database link to DBA with admin option;


grant create dimension to DBA with admin option;


grant create evaluation context to DBA with admin option;


grant create indextype to DBA with admin option;


grant create job to DBA with admin option;


grant create library to DBA with admin option;


grant create materialized view to DBA with admin option;


grant create operator to DBA with admin option;


grant create procedure to DBA with admin option;


grant create profile to DBA with admin option;


grant create public database link to DBA with admin option;


grant create public synonym to DBA with admin option;


grant create role to DBA with admin option;


grant create rollback segment to DBA with admin option;


grant create rule to DBA with admin option;


grant create rule set to DBA with admin option;


grant create sequence to DBA with admin option;


grant create session to DBA with admin option;


grant create synonym to DBA with admin option;


grant create table to DBA with admin option;


grant create tablespace to DBA with admin option;


grant create trigger to DBA with admin option;


grant create type to DBA with admin option;


grant create user to DBA with admin option;


grant create view to DBA with admin option;


grant debug any procedure to DBA with admin option;


grant debug connect session to DBA with admin option;


grant delete any table to DBA with admin option;


grant dequeue any queue to DBA with admin option;


grant drop any cluster to DBA with admin option;


grant drop any context to DBA with admin option;


grant drop any dimension to DBA with admin option;


grant drop any directory to DBA with admin option;


grant drop any evaluation context to DBA with admin option;


grant drop any index to DBA with admin option;


grant drop any indextype to DBA with admin option;


grant drop any library to DBA with admin option;


grant drop any materialized view to DBA with admin option;


grant drop any operator to DBA with admin option;


grant drop any outline to DBA with admin option;


grant drop any procedure to DBA with admin option;


grant drop any role to DBA with admin option;


grant drop any rule to DBA with admin option;


grant drop any rule set to DBA with admin option;


grant drop any sequence to DBA with admin option;


grant drop any sql profile to DBA with admin option;


grant drop any synonym to DBA with admin option;


grant drop any table to DBA with admin option;


grant drop any trigger to DBA with admin option;


grant drop any type to DBA with admin option;


grant drop any view to DBA with admin option;


grant drop profile to DBA with admin option;


grant drop public database link to DBA with admin option;


grant drop public synonym to DBA with admin option;


grant drop rollback segment to DBA with admin option;


grant drop tablespace to DBA with admin option;


grant drop user to DBA with admin option;


grant enqueue any queue to DBA with admin option;


grant execute any class to DBA with admin option;


grant execute any evaluation context to DBA with admin option;


grant execute any indextype to DBA with admin option;


grant execute any library to DBA with admin option;


grant execute any operator to DBA with admin option;


grant execute any procedure to DBA with admin option;


grant execute any program to DBA with admin option;


grant execute any rule to DBA with admin option;


grant execute any rule set to DBA with admin option;


grant execute any type to DBA with admin option;


grant export full database to DBA with admin option;


grant flashback any table to DBA with admin option;


grant force any transaction to DBA with admin option;


grant force transaction to DBA with admin option;


grant global query rewrite to DBA with admin option;


grant grant any object privilege to DBA with admin option;


grant grant any privilege to DBA with admin option;


grant grant any role to DBA with admin option;


grant import full database to DBA with admin option;


grant insert any table to DBA with admin option;


grant lock any table to DBA with admin option;


grant manage any queue to DBA with admin option;


grant manage scheduler to DBA with admin option;


grant manage tablespace to DBA with admin option;


grant on commit refresh to DBA with admin option;


grant query rewrite to DBA with admin option;


grant restricted session to DBA with admin option;


grant resumable to DBA with admin option;


grant select any dictionary to DBA with admin option;


grant select any sequence to DBA with admin option;


grant select any table to DBA with admin option;


grant select any transaction to DBA with admin option;


grant under any table to DBA with admin option;


grant under any type to DBA with admin option;


grant under any view to DBA with admin option;


grant update any table to DBA with admin option;



 

 教训啊!教训啊! 哎~~ 还得要重新 grant DBA TO SYSTEM 等那些用户  郁闷ing
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息