日期:2014-05-16  浏览次数:20587 次

如何创建Oracle 初始化DBA、Connect角色

|举报|字号?订阅

?
?
一、创建DBA角色
?
1.在plsql中以 sys/**** ?as sysdba登陆,创建角色DBA
使用下列语句进行创建,创建过程中会报错,不用管,这是给DBA赋权时有部分权限没有赋上
-- Create the role?
create role DBA;
-- Grant/Revoke object privileges?
grant execute on SYS.DBMS_DBVERIFY to DBA;
grant execute on SYS.DBMS_DEFER_QUERY to DBA;
grant execute on SYS.DBMS_DEFER_SYS to DBA;
grant execute on SYS.DBMS_FEATURE_USAGE to DBA;
grant execute on SYS.DBMS_FLASHBACK to DBA;
grant execute on SYS.DBMS_MONITOR to DBA;
grant execute on SYS.DBMS_RESUMABLE to DBA;
grant execute on SYS.DBMS_SERVER_ALERT to DBA;
grant execute on SYS.DBMS_SERVER_TRACE to DBA;
grant execute on SYS.DBMS_SERVICE to DBA;
grant execute on SYS.DBMS_STORAGE_MAP to DBA;
grant execute on SYS.DBMS_UADV_ARR to DBA;
grant execute on SYS.DBMS_UNDO_ADV to DBA;
grant execute on SYS.DBMS_WORKLOAD_REPOSITORY to DBA;
grant execute on SYS.LOAD_UNDO_STAT to DBA;
grant select, insert, update, delete, alter on SYS.MAP_OBJECT to DBA;
grant execute on SYS.OUTLN_EDIT_PKG to DBA;
grant execute on SYS.OUTLN_PKG to DBA;
grant execute on SYS.RESET_UNDO_STAT to DBA;
grant update on WKSYS.WK$SYS_CONFIG 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;
<