ORA-00381的具体处理办法
启动10g的oracle控制台
$ emctl start dbconsole
==================================================
$ emctl start dbconsole
==================================================
ORA-00381的具体处理办法
环境:aix5.3 + oracle10.2,内存是自动管理分配,改手工设置内存后就出现此现象了。
当修改完Oracle SGA参数之后(修改了db_cache_size),启动Oracle时报错ORA-00381
原因是:
Cause: User specified one or more of { db_cache_size ,
db_recycle_cache_size, db_keep_cache_size, db_nk_cache_size (where
n is one of 2,4,8,16,32) } AND one or more of { db_block_buffers ,
buffer_pool_keep , buffer_pool_recycle }. This is illegal.
Action: Use EITHER the old (pre-Oracle_8.2) parameters OR the new ones.
Don't specify both. If old size parameters are specified in the
parameter file, you may want to replace them with new parameters
since the new parameters can be modified dynamically and allow you
to configure additional caches for additional block sizes.
检查结果:
检查发现更改10g内存时使用了 db_block_buffers 旧参数 和 db_cache_size新参数
检查发现更改10g内存时使用了 db_block_buffers 旧参数 和 db_cache_size新参数
处理方案:
要去掉旧参数的使用,即把db_block_buffers 去掉
要去掉旧参数的使用,即把db_block_buffers 去掉
1, 先shutdown ,然后把spfile变成可编译的pfile:
SQL> shutdown immediate
SQL> create pfile from spfile
SQL> shutdown immediate
SQL> create pfile from spfile
2, 将pfile中的 db_block_buffers 删掉(注意做备份)
cp initjitdb.ora initjitdb_bak.ora
vi /oracle/app/product/10.2/dbs/initjitdb.ora 去掉db_block_buffers项
3, 然后使用修改过的pfile 启动
SQL> startup pfile='/oracle/app/product/10.2/dbs/initjitdb.ora'
cp initjitdb.ora initjitdb_bak.ora
vi /oracle/app/product/10.2/dbs/initjitdb.ora 去掉db_block_buffers项
3, 然后使用修改过的pfile 启动
SQL> startup pfile='/oracle/app/product/10.2/dbs/initjitdb.ora'
4, 接下来,创建spfile:
SQL> create spfile from pfile='/oracle/app/product/10.2/dbs/initjitdb.ora'
SQL> create spfile from pfile='/oracle/app/product/10.2/dbs/initjitdb.ora'
5, 创建完后,
SQL> shutdown immediate
SQL> shutdown startup
SQL> shutdown immediate
SQL> shutdown startup
6, 现在Oracle缺省使用spfile启动了,此时再修改SGA,POOL等的大小
SQL> alter system set sga_max_size=256M scope=spfile;
SQL> alter system set shared_pool_size=64m scope=spfile;
SQL> alter system set db_cache_size=64m scope=spfile;
SQL> alter system set large_pool_size=16M scope=spfile;
SQL> alter system set sga_max_size=256M scope=spfile;
SQL> alter system set shared_pool_size=64m scope=spfile;
SQL> alter system set db_cache_size=64m scope=spfile;
SQL> alter system set large_pool_size=16M scope=spfile;
7, 再次重启Oracle, 问题解决
SQL> shutdown immediate
SQL> shutdown startup
SQL> shutdown immediate
SQL> shutdown startup