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
分类:
Oracle
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?