问题背景 客户一套10.2.0.4的RAC数据库,因为要进行11g升级,所以最近部署了SPA采集任务,结果该任务部署没多久,SMON就爆发了ORA-21779错误。导致数据库运行非常缓慢。作为运维厂商,我们立马对数据库出错原因进行了分析。我们首先来看一下具体的SMON报的错
问题背景
客户一套10.2.0.4的RAC数据库,因为要进行11g升级,所以最近部署了SPA采集任务,结果该任务部署没多久,SMON就爆发了ORA-21779错误。导致数据库运行非常缓慢。作为运维厂商,我们立马对数据库出错原因进行了分析。我们首先来看一下具体的SMON报的错误信息。
*** 2014-04-26 13:47:28.987 SMON: following errors trapped and ignored: ORA-21779: duration not active ORA-06512: at line 1 Sat Apr 26 13:48:06 2014 >>> WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK! pid=36 System State dumped to trace file /oracle/app/oracle/admin/wcrma/bdump/wcrma2_smon_3610.trc wcrma2_smon_3610.trc name=SPA.SYSTP9+MPUyJ8/wLgRAAUT0SBEA== Drop transient type: SYSTP9+MPUyJ8/wLgRAAUT0SBEA==m call stack:ksdxfstk()+36 0.0007 hash=f8aafde8df1d0384b3c6849b889a14c9 timestamp=04-26-2014 12:48:31 LIBRARY OBJECT HANDLE: handle=1431525e88 mtx=1431525fb8(0) cdp=0
我们仔细的来看,SMON在清理一个transient type的时候,报了这个错误,也就是清理过程中出现了问题。而transient type是一种临时的type。它是在动态执行的时候产生在内存里面的。例如应用程序在语句里面定义了自定义的Type,在运行过程中,运行到这一步它就会转化成transient type。根据文档SMON: Following Errors Trapped And Ignored ORA-21779 (文档 ID 988663.1)的描述。这个问题会引起alert日志大量的增长,产生大量的trace,但是不会影响到数据库正常使用,但是在实际情况下,我们发现并非如此,因为我们的SMON进程是非常关键的进程,它在删除某些东西的时候需要申请到锁,而我们从这一次的堆栈中可以看到下列函数。我们主要来看下kqrigt函数。该函数在谷歌上搜索可以查到下列内容,可以看到这个函数里面需要申请row cache instance lock锁,如果申请不到,就会报WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK。而这里它需要申请的是dc_rollback_segments。
* Function kqrigt May call kslfre (...) May call kqrprl (...) May call ksesec0 (0x0FB5) May call ksbasend (dword ptr ds:kqrglk_+4, offset kqrglk_, 0x10, ...) May call kslgetl (?, 1, 0, offset kqrpl10_) May call kslwait (?, ds:kqrelk_, 0, ...) May call kslgetl (?, 1, ?, offset kqrpl10_) May call ksu_dispatch_tac () May call kskchk () May call ksuitr () May call ksesec0 (...) May call kgeasnmierr (ds:ksmgpp_, ds:ksefac_, "kqrigt-1", 0) May call kqrchk () May call ksurea () May call ksdwrf ("Failed to get row cache instance lock (post=%d,res=%lx)\n") May call kqrdrs (...) May call ksesec0 (0x259) May call ksesec0 (0x2BF) May call ksbcic (0x1E, ?, ?, 1) May call kslgetl (?, 1, ?, offset kqrpl43_) May call kgeasnmierr (ds:ksmgpp_, ds:ksefac_, "kqrgplt", 2) May call kgeasnmierr (ds:ksmgpp_, ds:ksefac_, "kqrigt-2", 0) May call ksdwra (">>> WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK! pid=%d") May call ksdwrf (">>> WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK! <h4> <strong>解决办法</strong> </h4> <p><font face="幼圆" size="3">那么这个问题怎么解决了?我们可以参考文档Receiving ORA-21780 Continuously in the Alert Log and SMON Trace Reports "Drop transient type". (文档 ID 1081950.1)的解决办法。首先针对这个transient type,smon大概会12个小时去清理一次。我们可以去手动进行清理,或者设置内部事件22834去阻止smon清理这类的type。</font></p> <p><font face="幼圆" size="3">1.直接删除</font></p> <pre class="brush:php;toolbar:false">Step 1 Make sure you have a good full backup. Step 2 spool obj.lis alter session set nls_date_format='DD-MON-YYYY HH24:MI:SS'; set pagesize 1000 select o.* from obj$ o, type$ t where o.oid$ = t.tvoid and bitand(t.properties,8388608) = 8388608 and (sysdate-o.ctime) > 0.0007; spool off Step 3 Find the object owner: Step 4 Drop the objects. DROP TYPE "SYSTPf/r2wN4keX7gQKjA3AFMSw==" FORCE;
2.设置内部事件22834去阻止SMON清理这类型的Type,但是可能会消耗更多的内存。
SQL> alter system set event='22834 trace name context forever, level 1' scope=spfile; System altered. SQL> alter system set event='22834 trace name context forever, level off' scope=spfile; System altered.
当然这个事件也可以使用oradebug来进行设置。这样就不需要进行重启的操作。
参考文档:
Receiving ORA-21780 Continuously in the Alert Log and SMON Trace Reports "Drop transient type". (文档 ID 1081950.1)
SMON: Following Errors Trapped And Ignored ORA-21779 (文档 ID 988663.1)
原文地址:SMON遇到ORA-21779: duration not active错误, 感谢原作者分享。

blobdatatypesinmysqlareusedforvorvoringlargebinarydatalikeimagesoraudio.1)useblobtypes(tinyblobtolonglongblob)基于dondatasizeneeds。 2)库孔素pet petooptimize绩效。3)考虑Xternal Storage Forel Blob romana databasesizerIndimprovebackupe

toadDuserStomySqlfromtheCommandline,loginasroot,thenusecreateuser'username'@'host'host'Indessifiedby'password'; tocreateanewuser.grantpermissionswithgrantprantallprivilegesondatabase

mySqlofferSeightStringDatateTypes:char,varchar,二进制,二进制,varbinary,blob,文本,枚举,枚举和set.1)长度,理想的forconsistentDatatalIkeCountryCodes.2)varcharisvariable长度,长度,效率foriforitifforiticforiticforiticforiticforiticforitic forvaryingdatalikename.3)

toaddauserinmysql,usethecreateuserstatement.1)usecreateuser'newuser'newuser'@'localHost'Indessifyby'password'; toCreateAuser.2)enforcestrongpasswordpolicieswithwithvalifatewithvalidationwithvalidationwithvalidate_passwordploodpluginsettings.3)

存储过程是MySQL中的预编译SQL语句集合,用于提高性能和简化复杂操作。1.提高性能:首次编译后,后续调用无需重新编译。2.提高安全性:通过权限控制限制数据表访问。3.简化复杂操作:将多条SQL语句组合,简化应用层逻辑。

MySQL查询缓存的工作原理是通过存储SELECT查询的结果,当相同查询再次执行时,直接返回缓存结果。1)查询缓存提高数据库读取性能,通过哈希值查找缓存结果。2)配置简单,在MySQL配置文件中设置query_cache_type和query_cache_size。3)使用SQL_NO_CACHE关键字可以禁用特定查询的缓存。4)在高频更新环境中,查询缓存可能导致性能瓶颈,需通过监控和调整参数优化使用。

MySQL被广泛应用于各种项目中的原因包括:1.高性能与可扩展性,支持多种存储引擎;2.易于使用和维护,配置简单且工具丰富;3.丰富的生态系统,吸引大量社区和第三方工具支持;4.跨平台支持,适用于多种操作系统。

MySQL数据库升级的步骤包括:1.备份数据库,2.停止当前MySQL服务,3.安装新版本MySQL,4.启动新版本MySQL服务,5.恢复数据库。升级过程需注意兼容性问题,并可使用高级工具如PerconaToolkit进行测试和优化。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

EditPlus 中文破解版
体积小,语法高亮,不支持代码提示功能

SublimeText3 Linux新版
SublimeText3 Linux最新版

Dreamweaver Mac版
视觉化网页开发工具

SublimeText3 英文版
推荐:为Win版本,支持代码提示!

MinGW - 适用于 Windows 的极简 GNU
这个项目正在迁移到osdn.net/projects/mingw的过程中,你可以继续在那里关注我们。MinGW:GNU编译器集合(GCC)的本地Windows移植版本,可自由分发的导入库和用于构建本地Windows应用程序的头文件;包括对MSVC运行时的扩展,以支持C99功能。MinGW的所有软件都可以在64位Windows平台上运行。