ORA-00824: cannot set sga_target due to existing internal settings, see alert log for more information

本文涉及的产品
日志服务 SLS,月写入数据量 50GB 1个月
简介:

    这篇文章是上篇文章”Expdp 导数错误 ORA-00832”的延续,前几天工作比较忙、累,直到今天才整理发出来。这个数据库实例的参数设置比较诡异其实是有原因的,由于这台数据库服务器系统是32位,数据库也是32位的。对于绝大部分32位系统上的32位数据库,SGA 最大的设置都不能超过2G,有的系统最大值甚至不能超过1.7G左右。DBA为了让内存充分利用,不至于浪费内存资源,于是想让SGA_MAX_SIZE 最大化,对数据库相关参数做了调整,设置参数USE_INDIRECT_DATA_BUFFERS为TRUE,调整SGA_MAX_SIZE为 3424M,然而使用USE_INDIRECT_DATA_BUFFERS参数,就不能在使用其他9i以后新增的内存控制参数了,比如 SGA_TARGET、DB_CACHE_SIZE等等,必须通过DB_BLOCK_BUFFERS参数来指定内存的容量。所以SGA_TARGET为 0,关闭了ASSM特性。下面述说一下当时的解决问题思路和过程。

clip_image002

首先我试着启用ASSM,设置sga_target的大小跟sga_max_size的大小一致,如下所示,结果报错:

epps> alter system set sga_target=3424M scope=both;

alter system set sga_target=3424M scope=both

*

ERROR at line 1:

ORA-02097: parameter cannot be modified because specified value is invalid

ORA-00824: cannot set sga_target due to existing internal settings, see alert log for more information

使用命令“oerr 错误类型 错误编号” ,查看错误信息的详细原因和Action,

[oracle@get-orasvr02 db_com_sql]$ oerr ora 00824

00824, 00000, "cannot set sga_target due to existing internal settings, see alert log for more information"

// *Cause: Unable to set sga_target due to current parameter settings.

// *Action: See alert log for more information.

通过告警日志查看详细出错信息,结果查看告警日志发现如下提示信息:

Cannot set sga_target with db_block_buffers set

Tue Sep  2 16:08:51 2013

在Metalink上查询了一下这方面的资料,发现SGA_TARGET > 0 不能与db_block_buffer这个过时的参数共存,否则就会出现ORA-00824错误。具体信息如下

Cause

If you enable automatic SGA Management by setting SGA_TARGET >0 and also have db_block_buffers(Obsolete parameter) in your parameter file (pfile/spfile)
Startup of Database fails with ORA-00824 Error

Solution

A) Either you need to disable the Automatic SGA Mangement by setting SGA_Target=0

==OR==

B) Replace the db_block_buffers parameter with db_cache_size parameter

STEPS TO RESOLVE

1. Make an OS copy of the spfile if you do not have a pfile for this database
2. Edit the copy of the spfile to remove the binary stuff before the first parameter
3. Remove the binary stuff after the last parameter.
4. Edit parameters needed to be changed.
5. Save the file and note name and location.
6. Start sqlplus and connect / as sysdba
7. Issue startup pfile = '<full path and file name of file just updated>'
8. Create spfile from pfile.

DB_BLOCK_BUFFERS cannot be combined with the dynamic DB_CACHE_SIZE parameter; combining these parameters in the same parameter file will produce an error.

epps> show parameter db_block_buffers

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

db_block_buffers                     integer     240000

epps> show parameter db_cache_size

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

db_cache_size                        big integer 0

epps>

clip_image004

解决步骤:

Step 1:备份spfile文件,避免修改数据库参数导致数据库宕机或启动不了的意外情况出现。

epps> show parameter spfile

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

spfile                               string      /u01/app/oracle/product/10.2.0

                                                 /db_1/dbs/spfileepps.ora

epps> !

cd  /u01/app/oracle/product/10.2.0/db_1/dbs/

cp spfileepps.ora  spfileepps.ora.bak

epps> create pfile='/u01/app/oracle/product/10.2.0/db_1/dbs/pfile_20130903_bak.ora' from spfile;

File created.

clip_image006

Step 2: 修改pfile下的数据库参数,例如去掉*.db_block_buffers=240000,如果只删除db_block_buffers参数,这时启动数据库就会报ORA-32006、ORA-00385错误,如下图所示

epps> startup pfile='/u01/app/oracle/product/10.2.0/db_1/dbs/pfile_20130903_bak.ora'

        ORA-32006: PARALLEL_AUTOMATIC_TUNING initialization parameter has been deprecated

        ORA-00385: cannot enable Very Large Memory with new buffer cache parameters

 

clip_image008

 

所以还需要修改 USE_INDIRECT_DATA_BUFFERS等参数。到此,问题出现的来龙去脉,解决方法都已全部给出,当然最后还是直接修改 streams_pool_size来解决问题方便,如果将SGA_MAX_SIZE改回去,肯定会对数据库性能产生比较大的影响。

 

 

相关实践学习
日志服务之使用Nginx模式采集日志
本文介绍如何通过日志服务控制台创建Nginx模式的Logtail配置快速采集Nginx日志并进行多维度分析。
相关文章
|
6月前
Transparent Data Encryption Data Dynamic and Data Dictionary Views You can query a set of dynamic and data dictionary views to find more information about Transparent Data Encryption (TDE) data.
Transparent Data Encryption Data Dynamic and Data Dictionary Views You can query a set of dynamic and data dictionary views to find more information about Transparent Data Encryption (TDE) data.
54 2
|
设计模式 Java 开发者
【小家Spring】面向切面编程之---Spring AOP的原理讲解以及源码分析(Cannot find current proxy: Set 'exposeProxy' property on )(下)
【小家Spring】面向切面编程之---Spring AOP的原理讲解以及源码分析(Cannot find current proxy: Set 'exposeProxy' property on )(下)
【小家Spring】面向切面编程之---Spring AOP的原理讲解以及源码分析(Cannot find current proxy: Set 'exposeProxy' property on )(下)
|
6月前
|
资源调度 前端开发
编译第三方前端项目时候出现Syntax Error: TypeError: Cannot set properties of undefined (setting ‘parent‘)
编译第三方前端项目时候出现Syntax Error: TypeError: Cannot set properties of undefined (setting ‘parent‘)
470 0
|
3月前
|
JavaScript 前端开发
15 Uncaught TypeError: Cannot set properties of null (setting ‘onclick‘)
这篇文章解释了在HTML文档中因JavaScript代码在页面元素加载之前执行导致的"Cannot set properties of null (setting ‘onclick’)"错误,并提供了将JavaScript代码置于`<body>`标签内或使用`window.onload`事件确保DOM完全加载后再绑定事件处理器的解决办法。
15 Uncaught TypeError: Cannot set properties of null (setting ‘onclick‘)
|
3月前
引用 AspNetCoreRateLimit => StatusCode cannot be set because the response has already started.
引用 AspNetCoreRateLimit => StatusCode cannot be set because the response has already started.
64 0
TypeError: Cannot set properties of undefined (setting ‘resdata‘),res定义数据出现的问题,定义的方法用this换成that
TypeError: Cannot set properties of undefined (setting ‘resdata‘),res定义数据出现的问题,定义的方法用this换成that
|
JavaScript API
【Vue】Cannot set reactive property on undefined,null,or primitive value:undefined
【Vue】Cannot set reactive property on undefined,null,or primitive value:undefined
331 0
|
6月前
|
开发工具
百度搜索:蓝易云【使用vim编辑器,进行保存时报错:E382: Cannot write, ‘buftype‘ option is set详解。】
请注意,'buftype'选项的设置通常是由于某些插件或配置文件导致的。如果您在Vim的配置文件(如.vimrc)或使用的插件中设置了'buftype'选项,请检查相关配置并确保设置正确。
97 0
|
11月前
|
分布式计算 Hadoop 大数据
|
JavaScript
关于js报错Cannot set properties of undefined (setting ‘innerHTML‘)的问题
关于js报错Cannot set properties of undefined (setting ‘innerHTML‘)的问题
409 0
下一篇
无影云桌面