ORAchk检查RAC后整改一例

简介: 使用ORAchk检查一个两个节点RAC的数据库,根据检查结果整改如下

使用ORAchk检查一个两个节点RAC的数据库,根据检查结果整改如下:

One or more network card used by clusterware do not have HOTPLUG=NO

修改文件,加入一行:


sudo vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
HOTPLUG=no
[oracle@localhost ~]$ sudo service network restart
Restarting network (via systemctl):                        [  OK  ]



Verify AUD$ and FGA_LOG$ tables use Automatic Segment Space Management

检查及解决办法如下:


SQL> set linesize 200;
SQL> select t.table_name,ts.segment_space_management from dba_tables t, dba_tablespaces ts where ts.tablespace_name = t.tablespace_name and t.table_name in ('AUD$','FGA_LOG$');
TABLE_NAME                SEGMEN
-------------------------------------------------------------------------------------------------------------------------------- ------
AUD$                 MANUAL
FGA_LOG$                MANUAL
SQL> 
BEGIN
DBMS_AUDIT_MGMT.set_audit_trail_location(audit_trail_type => DBMS_AUDIT_MGMT.AUDIT_TRAIL_AUD_STD,--this moves table AUD$ 
audit_trail_location_value => 'SYSAUX');  
END;  
/SQL>   2    3    4    5



PL/SQL procedure successfully completed.


SQL> SQL> 
BEGIN
DBMS_AUDIT_MGMT.set_audit_trail_location(audit_trail_type => DBMS_AUDIT_MGMT.AUDIT_TRAIL_FGA_STD,--this moves table FGA_LOG$ 
audit_trail_location_value => 'SYSAUX');
END;
/   
SQL>   2    3    4    5  
PL/SQL procedure successfully completed.
SQL> select t.table_name,ts.segment_space_management from dba_tables t, dba_tablespaces ts where ts.tablespace_name = t.tablespace_name and t.table_name in ('AUD$','FGA_LOG$');
TABLE_NAME                SEGMEN
-------------------------------------------------------------------------------------------------------------------------------- ------
FGA_LOG$                AUTO
AUD$                 AUTO


Database parameter CLUSTER_INTERCONNECTS is not set to the recommended value

节点一:


[grid@rac1 ~]$ oifcfg iflist
eth0  192.168.84.0
eth1  192.168.60.0
eth1  169.254.0.0
[grid@rac1 ~]$ oifcfg getif
eth0  192.168.84.0  global  public
eth1  192.168.60.0  global  cluster_interconnect
[grid@rac1 ~]$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:56:94:66:D3  
          inet addr:192.168.84.172  Bcast:192.168.84.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fe94:66d3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23795204 errors:0 dropped:0 overruns:0 frame:0
          TX packets:243349 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1467346168 (1.3 GiB)  TX bytes:300383686 (286.4 MiB)
eth0:3    Link encap:Ethernet  HWaddr 00:50:56:94:66:D3  
          inet addr:192.168.84.173  Bcast:192.168.84.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
eth1      Link encap:Ethernet  HWaddr 00:50:56:94:52:55  
          inet addr:192.168.60.172  Bcast:192.168.60.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fe94:5255/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17894262 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9998672 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:10556885940 (9.8 GiB)  TX bytes:6025968766 (5.6 GiB)
eth1:1    Link encap:Ethernet  HWaddr 00:50:56:94:52:55  
          inet addr:169.254.206.87  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2523401 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2523401 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2504861593 (2.3 GiB)  TX bytes:2504861593 (2.3 GiB)
SQL> select * from gv$cluster_interconnects;
   INST_ID NAME     IP_ADDRESS     IS_ SOURCE
---------- --------------- ---------------- --- -------------------------------
  1 eth1:1    169.254.206.87   NO
  2 eth1:1    169.254.197.14   NO


节点二


[grid@rac2 ~]$ oifcfg iflist
eth0  192.168.84.0
eth1  192.168.60.0
eth1  169.254.0.0
[grid@rac2 ~]$ oifcfg getif
eth0  192.168.84.0  global  public
eth1  192.168.60.0  global  cluster_interconnect
[grid@rac2 ~]$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:56:94:4B:3D  
          inet addr:192.168.84.174  Bcast:192.168.84.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fe94:4b3d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:25223377 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1045553 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4987636818 (4.6 GiB)  TX bytes:3630397073 (3.3 GiB)
eth0:1    Link encap:Ethernet  HWaddr 00:50:56:94:4B:3D  
          inet addr:192.168.84.175  Bcast:192.168.84.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
eth0:2    Link encap:Ethernet  HWaddr 00:50:56:94:4B:3D  
          inet addr:192.168.84.176  Bcast:192.168.84.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
eth1      Link encap:Ethernet  HWaddr 00:50:56:94:2D:5C  
          inet addr:192.168.60.174  Bcast:192.168.60.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fe94:2d5c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14705063 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13132509 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6313522258 (5.8 GiB)  TX bytes:10220055693 (9.5 GiB)
eth1:1    Link encap:Ethernet  HWaddr 00:50:56:94:2D:5C  
          inet addr:169.254.197.14  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2858036 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2858036 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:8403308652 (7.8 GiB)  TX bytes:8403308652 (7.8 GiB)



执行下面的命令查找 interconnect IP


sqlplus> connect / as sysdba
            oradebug setmypid
            oradebug ipc
            exit


第一个节点:IP 169.254.206.87

第二个节点:


SSKGXPT 0x7fe7bf79c1b8 flags 0x5 { READPENDING } sockno 4 IP 169.254.197.14 UDP 31848 lerr 0
SKGXP:[7fe7bf79ac48.32]{ctx}:


修改CLUSTER_INTERCONNECTS

第一个节点:


alter system set cluster_interconnects="169.254.206.87" scope=spfile sid='orcl1';


第二个节点:


alter system set cluster_interconnects="169.254.197.14" scope=spfile sid='orcl1';


修改需重启数据库


Consider increasing the value of the session_cached_cursors database parameter

查询SESSION_CACHED_CURSORS’ 和 ‘OPEN_CURSORS’ 参数的使用

select
'session_cached_cursors' parameter,
lpad(value, 5) value,
decode(value, 0, ' n/a', to_char(100 * used / value, '990') || '%') usage
from
( select
max(s.value) used
from
v$statname n,
v$sesstat s
where
n.name = 'session cursor cache count' and
s.statistic# = n.statistic#
),
( select
value
from
v$parameter
where
name = 'session_cached_cursors'
)
union all
select
'open_cursors',
lpad(value, 5),
to_char(100 * used / value, '990') || '%'
from
( select
max(sum(s.value)) used
from
v$statname n,
v$sesstat s
where
n.name in ('opened cursors current') and
s.statistic# = n.statistic#
group by
s.sid
),
( select
value
from
v$parameter
where
name = 'open_cursors'
)
/ 


如果这两个参数的对应的usage接近100%,需要增加。


Linux Disk I/O Scheduler should be configured to Deadline

默认的I/O Scheduler是CFQ,数据库应该设置成Deadline


The Completely Fair Queuing (CFQ) scheduler is the default algorithm in Red Hat Enterprise Linux 4 which is suitable for a wide variety of applications and provides a good compromise between throughput and latency. In comparison to the CFQ algorithm, the Deadline scheduler caps maximum latency per request and maintains a good disk throughput which is best for disk-intensive database
applications. Hence, the Deadline scheduler is recommended for database systems.


在每个节点上执行


# echo deadline > /sys/block/${ASM_DISK}/queue/scheduler


vm.min_free_kbytes should be set as recommended.

vm.min_free_kbytes 应该设置成 >= 524288 && <= 1048576 ,检查命令


/sbin/sysctl -n vm.min_free_kbytes
cat /proc/sys/vm/min_free_kbytes

如果结果不对,修改/etc/sysctl.conf 加入:“vm.min_free_kbytes >= 524288 && <= 1048576” 并且重新启动节点


Linux transparent huge pages are enabled

Linux下的大页分为两种类型:标准大页(Huge Pages)和透明大页(Transparent Huge Pages)。标准大页管理是预分配的方式,而透明大页管理则是动态分配的方式。相信有不少人将Huge Page和Transparent Huge Pages混为一谈。目前透明大页与传统HugePages联用会出现一些问题,导致性能问题和系统重启。Oracle 建议禁用透明大页(Transparent Huge Pages)。在 Oracle Linux 6.5 版中,已删除透明 HugePages。

检查


cat /proc/meminfo |grep AnonHugeP
AnonHugePages:    391168 k

修改。在/etc/rc.local加入:

echo never > /sys/kernel/mm/transparent_hugepage/enabled 
echo never > /sys/kernel/mm/transparent_hugepage/defrag 

CSS log file size has not been increased from default (50 MB)

检查:

 [grid@rac1 crs]$ crsctl get css logfilesize
CRS-4676: Successful get logfilesize 52428800 for Cluster Synchronization Services.
[grid@rac1 crs]$ 

修改,在每个节点上运行:

$GRID_HOME/bin/crsctl set css logfilesize 157286400
相关文章
|
移动开发 前端开发 Android开发
前端html input =“file“ ios/安卓解决无法选择图库/拍照问题
前端html input =“file“ ios/安卓解决无法选择图库/拍照问题
3799 0
|
Web App开发 存储 关系型数据库
|
监控 应用服务中间件 PHP
|
8月前
|
人工智能 安全 数据可视化
打工人效率翻倍!OpenClaw“养龙虾”全攻略,让 AI 替你上班
本文手把手教你用开源AI智能体OpenClaw“养龙虾”——告别重复办公,让AI自动整理文件、写周报、搜资料、抢电商、控家居。支持阿里云一键云端部署,零代码上手,新手友好。安全配置指南+成本避坑提醒,助你高效又安心地拥有专属数字员工。(239字)
1529 2
|
24天前
|
人工智能 弹性计算 API
2026 年双 11 阿里云大促|百炼 Token Plan 套餐折扣、计费规则全解析
2026阿里云双十一阿里云百炼大模型服务平台 Token Plan这套优惠政策,补齐了AI开发从测试、个人实践到企业团队落地的订阅方案。相比于直接按量计费,订阅模式可以提前锁定成本,搭配夜间折扣、用量加速计划,进一步降低AI业务开销。理清个人版、团队版档位差异、5折新客限制、额度重置规则,先做用量评估再下单,就可以合理选择套餐,把Token Plan的双十一优惠价值最大化。
279 0
|
3月前
|
数据采集 人工智能 定位技术
GEO优化长期没效果?问题诊断的六个关键维度
本文直击GEO(生成式引擎优化)常见困境——“投入久却无效果”,揭示问题多出在诊断缺失而非执行不力。全文以AI检索与生成机制为基,系统拆解“无效果”的三层本质,并提供六大可落地诊断维度及速查流程,兼顾新手入门、项目攻坚与系统学习三类读者,助力精准定位真堵点。
375 0
|
6月前
|
人工智能 数据挖掘 程序员
什么是OPC(一人公司)?AI智能体时代的新型超级个体正在崛起
本文系统解读AI时代的“一人公司”(OPC)新范式:它并非传统个体户,而是以AI智能体、自动化工作流和协同网络为核心的超级个体经营模式——一人调度AI军团,而非单打独斗。OPC正重塑创业门槛与人才生态。
|
11月前
|
机器学习/深度学习 存储 人工智能
AI 智能体开发的更新
AI智能体更新已迈入全生命周期自适应优化阶段:知识库实时同步、模型无损升级、工具自主发现、策略即代码、快照回滚机制五位一体,实现分钟级响应与秒级恢复,兼顾敏捷性与稳定性。(239字)
|
敏捷开发 人工智能 数据可视化
让AI替你写用例!Dify+RAG工作流,一键生成覆盖率达90%的测试方案
本文介绍如何利用Dify.ai与RAG技术构建智能测试用例生成工作流,通过接入需求文档、API接口等知识库,实现高覆盖率(超90%)的自动化用例生成,显著提升测试效率与质量,解放测试人力,助力敏捷开发。