Heim > Datenbank > MySQL-Tutorial > Hauptteil

数据库用户不能登录 alert日志报ORA-04031故障分析处理

WBOY
Freigeben: 2016-06-07 16:48:52
Original
1534 Leute haben es durchsucht

数据库用户不能登录 alert日志报ORA-04031故障分析处理

现象:
1、在数据库主机sqlplus  / as sysdba都进不去。
 
2、alert日志中报错如下:
 Errors in file /Oracle/admin/dbrac/bdump/dbrac2_q000_1329.trc:
 ORA-22303: type "SYS"."AQ$_HISTORY" not found
 ORA-00604: error occurred at recursive SQL level 1
 ORA-04031: unable to allocate 32 bytes of shared memory ("shared pool","select user#,type# from user...","sql area","tmp")
 
原因如下:
 1、由于不能在share pool中分配内存导致不能登录
 2、导致share pool不能分配内存的原因是数据库大量使用常量SQL(未使用绑定变量SQL)硬解析导致。
 
此时数据库sqlplus / as sysdba都进不去,怎么办?
 
解决办法:
 1、基于快速恢复数据库原则,,首先将pmon进程予以kill,重新拉起数据库
 
2、目前为减少该故障发生的概率,方法如下:
 在自动计划中加入自动刷数据库share pool计划,每天晚上1点刷一次,该操作对业务影响可以忽略,刷share pool的SQL如下:
 alter system flush shared_pool;
 
 3、为了彻底解决该问题,需应用方将常量SQL(未使用绑定变量SQL)全部修改成使用绑定变量SQL。

--------------------------------------分割线 --------------------------------------

在CentOS 6.4下安装Oracle 11gR2(x64)

Oracle 11gR2 在VMWare虚拟机中安装步骤

Debian 下 安装 Oracle 11g XE R2

--------------------------------------分割线 --------------------------------------

本文永久更新链接地址:

linux

Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!