enq: SQ - contention" waits in RAC

SQL> l
  1* select name, parameter1, parameter2, parameter3 from v$event_name where name like '&event'
SQL> /
Enter value for event: enq: SQ - contention
old   1: select name, parameter1, parameter2, parameter3 from v$event_name where name like '&event'
new   1: select name, parameter1, parameter2, parameter3 from v$event_name where name like 'enq: SQ - contention'

NAME                           PARAMETER1      PARAMETER2      PARAMETER3
------------------------------ --------------- --------------- ---------------
enq: SQ - contention           name|mode       object #        0

SQL>

原因:

最常见的原因是一个或多个序列被大量使用,并且这些序列的高速缓存大小可能不足以满足RAC
THe most common cause is that one or more sequences are getting used heavily, and the cache size for those sequences may not be adequate for RAC

解决:
1) Find out the sequence that is causing the "enq: SQ - contention" either from the system state dump, hang analyze output, AWR, or ASH report.
从系统状态转储,挂起分析输出,AWR或ASH报告中查找引起"enq:SQ  - 争用"的序列。

2) Issue "show sequence <sequence name>" or "SELECT SEQUENCE_NAME, CACHE_SIZE, ORDER_FLAG FROM USER_SEQUENCES;" after connecting to the problem database

3) If the sequence is NOT defined with CACHE and NOORDER option, the check if the attribute for the problem sequence can be changed to CACHE and NOORDER option.
If the application requires that the problem sequence must NOT be defined using CACHE and NOORDER option, then work with the application development to minimize the use of that sequence.
如果序列没有用CACHE和NOORDER选项定义,则检查问题序列的属性是否可以更改为CACHE和NOORDER选项。
如果应用程序要求不能使用CACHE和NOORDER选项来定义问题序列,那么应用程序开发将最小化该序列的使用。

4) If the sequence is defined with CACHE and NOORDER option and if the cache size is 20, the default cache size, (or a small value like 100), increase the cache size to 10000 by issuing
如果使用CACHE和NOORDER选项定义了序列,并且如果高速缓存大小为20,则默认高速缓存大小(或像100这样的小数值)通过发出将高速缓存大小增加到10000
ALTER SEQUENCE <cache name> CACHE 10000;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31397003/viewspace-2149628/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/31397003/viewspace-2149628/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值