oracle在首次启动的时候提示memory_target不正确,实例不能启动,如何去分析解决问题

 我来答
wallcopper
2018-01-25 · TA获得超过3447个赞
知道大有可为答主
回答量:1986
采纳率:86%
帮助的人:1819万
展开全部
1、11g中新增MEMORY_MAX_TARGET参数。memory_max_target是设定Oracle能占OS多大的内存空间,一个是Oracle SGA区最大能占多大内存空间。
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
本回答被网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式