首页

解决ORA-00604:error occurred at recursive SQL level 1..ORA-04031:unable to allocate 3896 bytes of shared memory..等错误造成无法连接oracle数据库

标签:ora00604,ora-04031,无法分配共享内存,oracle错误     发布时间:2019-02-25   

一、故障描述

通过PLSQL无法连接oracle数据库服务器,界面提示"ORA-00604:error occurred at recursive SQL level 1..ORA-04031:unable to allocate 3896 bytes of shared memory("shared pool","select  PRIVE_NUMBER from GV$..."sga heap(1,0)",kglsim obect batch"错误,如下图所示,

解决ORA-00604:error occurred at recursive SQL level 1..ORA-04031:unable to allocate 3896 bytes of shared memory..等错误造成无法连接oracle数据库

通过命令重启oracle服务报同样的问题,如下执行命令(source   ~/.bash_profile命令需当前oracle用户的环境执行生效oracle环境配置参数,具体参见”linux下安装oracle的具体配置步骤“文章)

[oracle@centos6 classes]$ source   ~/.bash_profile@b@ @b@[oracle@centos6 classes]$ sqlplus /nolog@b@@b@SQL*Plus: Release 11.2.0.1.0 Production on Mon Feb 25 04:26:02 2019@b@@b@Copyright (c) 1982, 2009, Oracle.  All rights reserved.@b@@b@SQL> connect  /as  sysdba;@b@ERROR:@b@ORA-01075: you are currently logged on@b@@b@@b@SQL> SHUTDOWN IMMEDIATE;@b@ORA-00604: error occurred at recursive SQL level 1@b@ORA-04031: unable to allocate 3896 bytes of shared memory ("shared pool","select count(*) from reg$","sga heap(1,0)","kglsim object batch")

二、解决方法

[root@centos6 ~]# su  oracle @b@[oracle@centos6 root]$  source   ~/.bash_profile@b@[oracle@centos6 root]$ sqlplus  /nolog@b@@b@SQL*Plus: Release 11.2.0.1.0 Production on Mon Feb 25 04:31:01 2019@b@@b@Copyright (c) 1982, 2009, Oracle.  All rights reserved.@b@@b@SQL> connect  /as  sysdba;@b@ERROR:@b@ORA-01075: you are currently logged on@b@@b@@b@SQL> shutdown abort;  @b@ORACLE instance shut down. @b@@b@SQL> startup;@b@ORA-00000: normal, successful completion@b@@b@SQL> exit;

另外,重启监听服务(可不重启监听,视情况而定)

[oracle@centos6 root]$lsnrctl status  @b@..@b@[oracle@centos6 root]$lsnrctl stop  @b@..@b@[oracle@centos6 root]$lsnrctl start
  • ◆ 相关内容