ORACLE DBA ROLE重建

來源:互聯網
上載者:User

           今天犯傻,不小心刪除了,本來想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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.