oracle 的dba删除了

(1)sys 以sysdba的权限进入

connect sys/sys as sysdba

(2)创建角色

create role DBA; 

(3)给角色付系统权限 和对象权限

-- Grant/Revoke object privileges   
grant execute on SYS.DBMS_DEFER_QUERY to DBA;  
grant execute on SYS.DBMS_DEFER_SYS to DBA;  
grant execute on SYS.DBMS_FLASHBACK to DBA;  
grant execute on SYS.DBMS_RESUMABLE to DBA;  
grant execute on SYS.JIS_EXP to DBA;  
grant execute on SYS.JIS_IMP_AUX to DBA;  
grant execute on SYS.LT_EXPADM_PKG to DBA;  
grant execute on SYS.LT_EXPORT_PKG to DBA;  
grant execute on SYS.OUTLN_EDIT_PKG to DBA;  
grant execute on SYS.OUTLN_PKG 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 imp_full_database to DBA;  
grant java_admin to DBA;  
grant java_deploy to DBA;  
grant olap_dba to DBA;  
grant select_catalog_role to DBA with admin option;  
grant wm_admin_role to DBA;  
-- Grant/Revoke system privileges   
grant administer database trigger to DBA with admin option;  
grant administer resource manager to DBA with admin option;  
grant administer security 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 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 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 security profile to DBA with admin option;  
grant alter any sequence to DBA with admin option;  
grant alter any snapshot 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 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 index to DBA with admin option;  
grant create any indextype to DBA with admin option;  
grant create any library 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 security profile to DBA with admin option;  
grant create any sequence to DBA with admin option;  
grant create any snapshot 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 indextype to DBA with admin option;  
grant create library 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 security profile to DBA with admin option;  
grant create sequence to DBA with admin option;  
grant create session to DBA with admin option;  
grant create snapshot 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 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 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 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 sequence to DBA with admin option;  
grant drop any snapshot 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 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 type 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 privilege to DBA with admin option;  
grant grant any role 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 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 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;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值