首页 » 系统相关 » Troubleshooting VI 命令 ex: 0602-101 Out of memory saving lines for undo

Troubleshooting VI 命令 ex: 0602-101 Out of memory saving lines for undo

VI 在Unix、Linux系统是使用最常用的命令,DBA 经常在服务器上查看DB ALERT LOG等日志文件时,经常会遇到” ex: 0602-101 Out of memory saving lines for undo.” 报错,有时不得以用tail +more,甚至可以用awk +sed直接过滤, 这里记录一下解决VI 打开报错的问题,即使百MB的文件。

[oracle@weejar:/oracle/app/oracle/diag/rdbms/prianbob/anbob1/trace> vi alert*
 2 files to edit.

 ex: 0602-101 Out of memory saving lines for undo.
:q
 There is 1 more file to edit.
:q

方法一 使用EXINIT 或 .exrc 文件,EXINIT环境变量优先级覆盖.exrc文件冲突配置。vi 打开时首先会读取EXINIT变量

[oracle@weejar:/oracle/app/oracle/diag/rdbms/prianbob/anbob1/trace> export EXINIT="set ll=20000000 dir=/tmp"
[oracle@weejar:/oracle/app/oracle/diag/rdbms/prianbob/anbob1/trace> vi alert*
 2 files to edit.
"alert_anbob1.log" 2713611 lines, 151123933 characters 
Mon Aug 06 17:00:29 2018
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Private Interface 'en5' configured from GPnP for use as a private interconnect.
  [name='en5', type=1, ip=169.254.47.127, mac=7c-fe-90-cd-11-3b, net=169.254.0.0/16, mask=255.255.0.0, use=haip:cluster_interconnect/62]
Public Interface 'en4' configured from GPnP for use as a public interface.

方法二 使用-y 参数

[oracle@weejar:/oracle/app/oracle/diag/rdbms/prianbob/anbob1/trace> vi -y99999999 alert*
"alert_anbob1.log" 2714286 lines, 151153022 characters 
Mon Aug 06 17:00:29 2018
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Private Interface 'en5' configured from GPnP for use as a private interconnect.
  [name='en5', type=1, ip=169.254.47.127, mac=7c-fe-90-cd-11-3b, net=169.254.0.0/16, mask=255.255.0.0, use=haip:cluster_interconnect/62]
Public Interface 'en4' configured from GPnP for use as a public interface.
  [name='en4', type=1, ip=1.2.3.4, mac=7c-fe-90-cd-11-3a, net=1.2.3.0/24, mask=255.255.255.0, use=public/1]
Public Interface 'en4' configured from GPnP for use as a public interface.
  [name='en4', type=1, ip=1.2.3.227, mac=7c-fe-90-cd-11-3a, net=1.2.3.0/24, mask=255.255.255.0, use=public/1]
Public Interface 'en4' configured from GPnP for use as a public interface.
  [name='en4', type=1, ip=1.2.3.113, mac=7c-fe-90-cd-11-3a, net=1.2.3.0/24, mask=255.255.255.0, use=public/1]
Picked latch-free SCN scheme 3
Autotune of undo retention is turned off.
打赏

,

对不起,这篇文章暂时关闭评论。