如何限制oracle的trace files及alert file大小

简介:

Each server and background process writes to a trace file. When a process detects an internal error, it writes information about the error to its trace file. The file name format of a trace file is sid_processname_unixpid.trc, where:

■sid is the instance system identifier

■processname is a three or four-character abbreviated process name identifying the Oracle Database process that generated the file (for example, pmon, dbwr, ora, or reco)

■unixpid is the operating system process ID number

The following is a sample trace file name:

$ORACLE_BASE/diag/rdbms/mydb/mydb/trace/test_lgwr_1237.trc

Set the MAX_DUMP_FILE initialization parameter to at least 5000 to ensure that the trace file is large enough to store error information.

Alert Files

The alert_sid.log file stores information about significant database events and messages. Events that affect the database instance or database are recorded in this file.


  MAX_DUMP_FILE_SIZE参数默认为unlimited,如果生成了很大的文件,就会充满文件系统。应该设置一个比较合理的数值,以避免此类事情发生。

 

 

    MAX_DUMP_FILE_SIZE参数 限定了trace files 以及alert file大小,其值

1、当给具体数字时,是操作系统的数据块数。
2、当以m或k作为后缀时,表示以m或k为单位。
3、unlimited表示没有限制,只要os允许。(默认)

SQL> col name format a50;

SQL> col type format a10;

SQL> col value format a30;

SQL> show parameter max_dump_file_size;


NAME      TYPE VALUE

------------------------------------ ---------- ------------------------------

max_dump_file_size      string UNLIMITED

wKioL1VuaC_hyU63AAC-ofdAq6c882.jpg

修改max_dump_file_size参数:

SQL> alter system set max_dump_file_size='1024m';

System altered.

SQL> show parameter max_dump_file_size;

NAME      TYPE VALUE

------------------------------------ ---------- ------------------------------

max_dump_file_size      string 1024M

SQL> 

修改完成!



本文转自 abc3486389 51CTO博客,原文链接:
http://blog.51cto.com/1336014/1657766

相关文章
|
10月前
|
Oracle 前端开发 关系型数据库
在Oracle的ADR中设置自动删除trace文件的策略
姚远在一个有两万个客户的公司做数据库支持,什么稀奇古怪的事情都能遇到,有个客户的数据库不停地产生大量的trace,经常把硬盘撑爆,看看姚远怎么解决这个问题的。
|
10月前
|
Oracle 前端开发 关系型数据库
在Oracle的ADR中设置自动删除trace文件的策略
姚远老师在一个有两万个客户的公司做数据库支持,什么稀奇古怪的事情都能遇到,有个客户的数据库不停地产生大量的trace,经常把硬盘撑爆,看看姚远怎么解决这个问题的。
|
Oracle 关系型数据库
Oracle trace文件的清理
Oracle trace文件的清理
376 0
Oracle trace文件的清理
|
Oracle 关系型数据库 Unix
Oracle中常用跟踪诊断trace配置
Oracle中常用跟踪诊断trace配置
199 0

推荐镜像

更多