数据库版本12CR1,新装的两个节点的RAC
由于资源管理器没有关闭,数据库早上发生挂起,sqlplus无法连接到实例,后来重启CRS解决
crsctl stop crs
crsctl start has
如何彻底关闭资源管理器,如下:
3、 彻底关闭资源管理器
【oracle】【1节点】
(1). 设置当前的resource manager plan为空
登录到cdb修改以下参数
alter system set resource_manager_plan='' scope=both;
(2).修改所有窗口不使用 资源管理器的计划。
登录到cdb和pdb修改以下设置
select 'execute dbms_scheduler.set_attribute('''||WINDOW_NAME||''',''RESOURCE_PLAN'','''');' from dba_scheduler_windows;
执行查询结果
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> select 'execute dbms_scheduler.set_attribute('''||WINDOW_NAME||''',''RESOURCE_PLAN'','''');' from dba_scheduler_windows;
'EXECUTEDBMS_SCHEDULER.SET_ATTRIBUTE('''||WINDOW_NAME||''',''RESOURCE_PLAN'','''
--------------------------------------------------------------------------------
execute dbms_scheduler.set_attribute('WEEKEND_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('WEEKNIGHT_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('SUNDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('SATURDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('FRIDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('THURSDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('WEDNESDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('TUESDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('MONDAY_WINDOW','RESOURCE_PLAN','');
9 rows selected.
SQL> alter session set container=wjjs;
Session altered.
SQL> show con_name
CON_NAME
------------------------------
WJJS
SQL> select 'execute dbms_scheduler.set_attribute('''||WINDOW_NAME||''',''RESOURCE_PLAN'','''');' from dba_scheduler_windows;
'EXECUTEDBMS_SCHEDULER.SET_ATTRIBUTE('''||WINDOW_NAME||''',''RESOURCE_PLAN'','''
--------------------------------------------------------------------------------
execute dbms_scheduler.set_attribute('WEEKEND_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('WEEKNIGHT_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('SUNDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('SATURDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('FRIDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('THURSDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('WEDNESDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('TUESDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('MONDAY_WINDOW','RESOURCE_PLAN','');
9 rows selected.
(3)并关闭自动分析任务
登录到cdb和pdb修改以下设置
BEGIN
DBMS_AUTO_TASK_ADMIN.DISABLE(
client_name => 'auto space advisor',
operation => NULL,
window_name => NULL);
END;
/
BEGIN
DBMS_AUTO_TASK_ADMIN.DISABLE(
client_name => 'sql tuning advisor',
operation => NULL,
window_name => NULL);
END;
/