oracle 启动错误:MEMORY_TARGET not supported on this system

2018-01-25

11g中新增MEMORY_MAX_TARGET参数。memory_max_target是设定Oracle能占OS多大的内存空间,一个是Oracle SGA区最大能占多大内存空间。

1、11g中默认为0则初始状态下取消了Memory_target的作用,完全和10g在内存管理上一致,完全向下兼容。

2、SQL> show parameter target
memory_max_target                    big integer 1520M

3、命令修改
SQL>ALTER SYSTEM SET MEMORY_MAX_TARGET = 1024M SCOPE = SPFILE;
SQL>ALTER SYSTEM SET MEMORY_TARGET = 1024M SCOPE = SPFILE;
SQL>ALTER SYSTEM SET SGA_TARGET =0 SCOPE = SPFILE;
SQL>ALTER SYSTEM SET PGA_AGGREGATE_TARGET = 0 SCOPE = SPFILE;

4、错误
ALTER SYSTEM SET MEMORY_MAX_TARGET = 4096M SCOPE =both; both必须改为spfile.
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
5、错误
ALTER SYSTEM SET MEMORY_TARGET = 4096M SCOPE =sfile;
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-00837: Specified value of MEMORY_TARGET greater than MEMORY_MAX_TARGET
6、我的主机内存为4G,我将MEMORY_TARGET设置为4G,无法启动
SQL> ALTER SYSTEM SET MEMORY_MAX_TARGET = 4096M SCOPE=spfile;

System altered.

SQL> ALTER SYSTEM SET MEMORY_TARGET = 4096M SCOPE=spfile;

System altered.

SQL> create pfile from spfile;

File created.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
oerr ora 845

00845, 00000, "MEMORY_TARGET not supported on this system"
// *Cause: The MEMORY_TARGET parameter was not supported on this operating system or /dev/shm was not sized correctly on Linux.
// *Action: Refer to documentation for a list of supported operating systems. Or, size /dev/shm to be at least the SGA_MAX_SIZE on each Oracle instance running on the system.

因为tmpfs的大小MEMORY_TARGET的设置,就会报这种错误。
cat /etc/fstab
tmpfs                   /dev/shm                tmpfs   defaults,size=3G    0 0
umount /dev/shm
fuser -km /dev/shm
mount /dev/shm

7、vi $ORACLE_HOME/dbs/initSID.ora
需要提前create pfile from spfile;
SQL>startup pfile=initSID.ora

或者vi $ORACLE_HOME/dbs/spfileSID.ora
将下列行修改为合适的大小或者直接删除
*.memory_max_target=4294967296
*.memory_target=4294967296

SQL>startup

分类:数据库 | 标签: |

相关日志

评论被关闭!