ITPub博客

首页 > Linux操作系统 > Linux操作系统 > spfile.ora ? ORA-00824 ? ORA-00830 ?statistics_level = basic ?

spfile.ora ? ORA-00824 ? ORA-00830 ?statistics_level = basic ?

原创 Linux操作系统 作者:lfree 时间:2007-05-29 00:00:00 0 删除 编辑

关键字:ORA-00824 ORA-00830 statistics_level = basic

今天上午发现测试的服务器重新启动以后oracle就没有起来,手工执行
srvctl start instance -d orcl -i orcl1

出现如下提示:
PRKP-1001 : Error starting instance orcl1 on node xxx-rac1
CRS-0215: Could not start resource 'ora.orcl.orcl1.inst'.

采用这样登陆:
sqlplus "sys as sysdba"
SQL> startup
ORA-00824: cannot set sga_target due to existing internal settings, see alert log for more information

检查alter*.log 文件,并没有发现有什么相关错误。

改用这样启动,成功!
SQL> startup pfile=/u01/app/oracle/admin/orcl/pfile/init.ora

估计spfile文件有问题,再认真检查alert*.log 文件,发现如下:
Tue May 27 09:11:33 2007
ALTER SYSTEM SET statistics_level='BASIC' SCOPE=SPFILE;

可以肯定有人修改spfile文件,将statistics_level='BASIC'修改,再重新启动以后出现问题。问其他人员, 确定是修改过spfile文件。

在/u01/app/oracle/admin/orcl/pfile/spfile.ora,内容如下:
SPFILE='+ASM_DISK1/ORCL/spfileorcl.ora'
STATISTICS_LEVEL=typical

再执行如下操作:
sqlplus "sys as sysdba"

SQL> startup pfile=/u01/app/oracle/admin/orcl/pfile/init.orax
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +ASM_DISK1/orcl/spfileorcl.ora

SQL> ALTER SYSTEM SET statistics_level=typical scope=spfile ;
System altered.


关闭数据库,再启动,一切OK!
再重复操作,修改spfile,步骤如下:
SQL> ALTER SYSTEM SET statistics_level='BASIC' SCOPE=both
or
SQL> ALTER SYSTEM SET statistics_level='BASIC' SCOPE=memory

ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-00830: cannot set statistics_level to BASIC with auto-tune SGA enabled

ORA-00830: cannot set statistics_level to BASIC with auto-tune SGA enabled
Cause: The user attempted to set statistics_level to BASIC with auto-tune SGA enabled which cannot be done because auto-tune SGA cannot work with statistics_level set to BASIC.
Action: Disable auto-tune SGA and try setting the statistics_level to BASIC again.

也就是说在auto-tune SGA enabled的情况下,是不能修改statistics_level='BASIC'.但是ALTER SYSTEM SET statistics_level='BASIC' SCOPE=SPFILE,却可以正常,导致
下次启动数据库不能正常执行。


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/267265/viewspace-83043/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    2284
  • 访问量
    6023390