dba角色重建步骤
参考MOS:
sqlplus / as sysdba
create role dba;
grant all privileges, select any dictionary, analyze any dictionary to dba with admin option;
grant select_catalog_role to dba with admin option;
grant execute_catalog_role to dba with admin option;
grant delete_catalog_role to dba with admin option;
grant all on map_object to dba;
XDB is INVALID and ORA-01001, ORA-00600 [qm_get_kusr], [], [], [] generated (Doc ID 2273627.1)
How to Recreate DBA Role if Dropped (Doc ID 1068678.6)
--create dba role
sqlplus / as sysdba
create role dba;
grant all privileges, select any dictionary, analyze any dictionary to dba with admin option;
grant select_catalog_role to dba with admin option;
grant execute_catalog_role to dba with admin option;
grant delete_catalog_role to dba with admin option;
grant all on map_object to dba;
-- shutdown and restart the db
shutdown immediate
startup
-- grant XDB-related privs to DBA
GRANT xdbadmin TO dba;
grant all on XDB.XDB$RESOURCE to dba;
grant all on XDB.XDB$H_INDEX to dba;
grant all on XDB.XDB$H_LINK to dba;
grant all on XDB.XDB$D_LINK to dba;
grant all on XDB.XDB$NLOCKS to dba;
grant all on XDB.XDB$WORKSPACE to dba;
grant all on XDB.XDB$CHECKOUTS to dba;
grant all on XDB.XDB$ACL to dba;
grant all on XDB.XDB$CONFIG to dba;
grant all on XDB.XDB$RESCONFIG to dba;
grant all on XDB.XS$DATA_SECURITY to dba;
grant all on XDB.XS$PRINCIPALS to dba;
grant all on XDB.XS$ROLESETS to dba;
grant all on XDB.XS$SECURITYCLASS to dba;
declare
suf varchar2(26);
stmt varchar2(2000);
begin
select toksuf into suf from xdb.xdb$ttset where flags = 0;
stmt := 'grant all on XDB.X$PT' || suf || ' to DBA';
execute immediate stmt;
stmt := 'grant all on XDB.X$PT' || suf || ' to SYSTEM WITH GRANT OPTION';
execute immediate stmt;
end;
/
grant execute on XDB.DBMS_CSX_ADMIN to dba;
grant execute on XDB.DBMS_XDB_ADMIN to dba;
-- validate XDB
execute dbms_regxdb.validatexdb;
SELECT substrb(Comp_ID,1,10)Comp_ID,
substrb(Status,1,8)Status,
substrb(Version,1,12)Version,
substrb(Comp_Name,1,35)Comp_Name
FROM DBA_Registry
WHERE comp_id = 'XDB';
本文来自博客园,作者:Eddie小陈,转载请注明原文链接:https://www.cnblogs.com/orachen/p/15878744.html

浙公网安备 33010602011771号