数据库中的报警日志过大,导致无法打开阅读

[oracle@tran110 trace]$ du -sh alert_orcl.log
38M alert_orcl.log

对原来的报警日志改名进行备份

[oracle@tran110 trace]$ mv alert_orcl.log alert_orcl.log_bk_20151113

创建新的 alert 日志

[oracle@tran110 trace]$ touch alert_orcl.log alert_orcl.log

切换日志,查看新的日志文件能否正常写入信息

[oracle@tran110 ~]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.3.0 Production on Fri Nov 13 16:53:56 2015


Copyright (c) 1982, 2011, Oracle.  All rights reserved.




Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> alter system switch logfile;


System altered.

查看日志的内容

[oracle@tran110 trace]$ tail -20 alert_orcl.log
Fri Nov 13 16:54:03 2015
Thread 1 advanced to log sequence 2912 (LGWR switch)
  Current log# 2 seq# 2912 mem# 0: /u01/app/oracle/oradata/orcl/redo02.log




来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26506993/viewspace-1837021/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26506993/viewspace-1837021/

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐