有一AIX平台上的oracle产生一个大小为10G+的数据库日志跟踪文件,以致ORACLE安装目录充满,新的用户请求被拒绝,影响服务。
反思:加强监控手段。
MAX_DUMP_FILE_SIZE参数默认为unlimited,如果生成了很大的文件,就会充满文件系统。应该设置一个比较合理的数值,以避免此类事情发生。
MAX_DUMP_FILE_SIZE参数 限定了trace files 以及alert file大小,其值
1、当给具体数字时,是操作系统的数据块数。
2、当以m或k作为后缀时,表示以m或k为单位。
3、unlimited表示没有限制,只要os允许。(默认)
SQL> show parameter max_dump
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
max_dump_file_size string UNLIMITED
SQL> alter system set max_dump_file_size=1000000k;
alter system set max_dump_file_size=1000000k
*
ERROR at line 1:
ORA-02065: illegal option for ALTER SYSTEM
--注意单引号
SQL> alter system set max_dump_file_size='1000000k';
System altered.
SQL> show parameter max_dump
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
max_dump_file_size string 1000000k
SQL> alter system set max_dump_file_size=3000;
System altered.
SQL> show parameter max_dump
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
max_dump_file_size string 3000
SQL> alter system set max_dump_file_size='1024m' scope=both;
System altered.
SQL> show parameter max_dump
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
max_dump_file_size string 1024m
Oracle® Database Reference10g Release 2 (10.2) Part Number B14237-04
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.