限制oracle trace 文件大小
2007-10-10 17:34:55| 分类: oracle | 标签:|字号
max_dump_file_size参数在oracle数据库中用来限制 oracle trace 文件大小
max_dump_file_size 的单位是 操作系统块 默认值为 UNLIMITED
在有些时候,oracle会产生大量的trc文件,如果不加以限制,可能会导致磁盘空间很快耗尽,导致数据库挂起,所以适当的限制trc文件大小,是非常必要的。
SQL> show parameter max_dump_file_size
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
max_dump_file_size string 100000
SQL> alter system set max_dump_file_size=2000;
System altered.
SQL>
也可以这样设置 其大小:
alter system set max_dump_file_size='1M';
alter system set max_dump_file_size='1k';
--oracle doc :
MAX_DUMP_FILE_SIZE Property Description
Parameter type String
Syntax MAX_DUMP_FILE_SIZE = { integer [K | M] | UNLIMITED }
Default value UNLIMITED
Modifiable ALTER SESSION, ALTER SYSTEM
Range of values 0 to unlimited, or UNLIMITED
Basic No
MAX_DUMP_FILE_SIZE specifies the maximum size of trace files (excluding the alert file). Change this limit if you are concerned that trace files may use too much space.
A numerical value for MAX_DUMP_FILE_SIZE specifies the maximum size in operating system blocks.
A number followed by a K or M suffix specifies the file size in kilobytes or megabytes.
The special value string UNLIMITED means that there is no upper limit on trace file size. Thus, dump files can be as large as the operating system permits.