环境:linux x86-64 oracle 11gR2版本
由于是虚拟机安装的系统,本机内存就比较小,但是在安装oracle时候,给虚拟机1G的内存,后来安装完成后我就想修改虚拟机内存为256M,但是在安装oracle的时候分配的SGA大小查过了256M
因此我想修改sga的大小,语句如下:
alter system sga_max_size=100M
alter system sga_targe=100M
修改完成后重启数据库就开始报错:ORA-00823: Specified value of sga_target greater than sga_max_size
百度了一下说是可以用如下方法修改:
create pfile from spfile;
然后直接修改pfile中sga的大小,可是无论我怎么修改都是sga的大小都是报ora-008023错误
最后没办法只能把$ORACLE_BASE/admin/$ORACLE_SID/pfile/initxxx.ora.xxxxxxx 拷贝到$ORACLE_HOME/dbs/initxxx.ora
create spfile from pfile;
startup
这才顺利的启动了oracle
下面是oracle官方文档对于ora-00823问题的描述:
ORA-00823: Specified value of sga_target greater than sga_max_size
Cause: The specified value of sga_target is greater than sga_max_size.
Action: Increase sga_max_size to match up with sga_target or decrease sga_target to match up with sga_maxsize.