分类: Oracle
2012-11-06 10:35:02
参数文件的根本作用就是“覆盖参数的默认值”,以便刻画出一个最适合自己应用场景的环境
因此参数文件中记录的都是我们调研的,与默认值存在不同
通过删除pfile参数文件中的的参数,可达到恢复参数为其默认值的目的
下面用一个实验来测试一下:
db_recovery_file_dest_size参数的作用是限制闪回恢复区可存放文件总大小
一旦将参数db_recovery_file_dest_size设置为非零值后“很难”恢复为默认值“0”。
这里我们用reset对spfile操作,来恢复为0
[sql] view plaincopyprint?
1. sys@ORCL> show parameter db_recovery_file_dest_size
2.
3. NAME TYPE VALUE
4. ------------------------------------ ----------- ------------------------------
5. db_recovery_file_dest_size big integer 2G
6.
7. sys@ORCL> alter system reset db_recovery_file_dest_size scope=spfile sid='*';
8.
9. System altered.
10.
11.sys@ORCL> shutdown immediate
12.Database closed.
13.Database dismounted.
14.ORACLE instance shut down.
15.
16.sys@ORCL> create pfile from spfile;
17.
18.编辑pfile 去掉DB_RECOVERY_FILE_DEST
19.
20.SQL> startup pfile='/u01/app/oracle/product/10.2.0/db_1/dbs/initorcl.ora';
21.ORACLE instance started.
22.
23.Total System Global Area 419430400 bytes
24.Fixed Size 1219760 bytes
25.Variable Size 146801488 bytes
26.Database Buffers 268435456 bytes
27.Redo Buffers 2973696 bytes
28.Database mounted.
29.Database opened.
30.SQL> show parameter db_recovery_file_dest_size
31.
32.NAME TYPE VALUE
33.------------------------------------ ----------- ------------------------------
34.db_recovery_file_dest_size big integer 0