WEB开发网
开发学院数据库Oracle 11G访问DBA_OBJECTS和V$LOCK视图时HANG住 阅读

11G访问DBA_OBJECTS和V$LOCK视图时HANG住

 2008-08-28 12:43:35 来源:WEB开发网   
核心提示:11g也存在访问数据字典出现长时间等待的问题, 今天在检查11g被锁对象时,11G访问DBA_OBJECTS和V$LOCK视图时HANG住,发现了这个问题,数据库版本Oracle rac 11.1.0.6 for Solaris sparc64

11g也存在访问数据字典出现长时间等待的问题。

今天在检查11g被锁对象时,发现了这个问题。数据库版本Oracle rac 11.1.0.6 for Solaris sparc64。

   SQL>SELECT*FROMV$VERSION;
  BANNER
  --------------------------------------------------------------------------------
  OracleDatabase11gEnterpriseEditionRelease11.1.0.6.0-64bitProduction
  PL/SQLRelease11.1.0.6.0-Production
  CORE11.1.0.6.0Production
  TNSforSolaris:Version11.1.0.6.0-Production
  NLSRTLVersion11.1.0.6.0-Production

下面看看造成问题的SQL:

   SQL>SETTIMINGON
  SQL>SETAUTOTON
  SQL>SELECTOWNER,OBJECT_NAMEFROMDBA_OBJECTS
  2WHEREOBJECT_IDIN(SELECTID1FROMV$LOCKWHERESID=305);
  OWNEROBJECT_NAME
  ------------------------------------------------------------
  SYSORA$BASE
  TESTT_PARALLEL
  已用时间:00:26:49.82
  执行计划
  ----------------------------------------------------------
  Planhashvalue:444070136
  ---------------------------------------------------------------------------------------------------
  |Id|Operation|Name|Rows|Bytes|Cost(%CPU)|Time|
  ---------------------------------------------------------------------------------------------------
  |0|SELECTSTATEMENT||660|63360|181(5)|00:00:03|
  |*1|FILTER||||||
  |2|VIEW|DBA_OBJECTS|65980|6185K|181(5)|00:00:03|
  |3|UNION-ALL||||||
  |*4|FILTER||||||
  |*5|HASHJOIN||71138|8475K|178(5)|00:00:03|
  |6|TABLEACCESSFULL|USER$|87|1479|3(0)|00:00:01|
  |*7|HASHJOIN||71138|7294K|174(5)|00:00:03|
  |8|INDEXFULLSCAN|I_USER2|87|2001|1(0)|00:00:01|
  |*9|TABLEACCESSFULL|OBJ$|71138|5696K|172(4)|00:00:03|
  |*10|TABLEACCESSBYINDEXROWID|IND$|1|8|2(0)|00:00:01|
  |*11|INDEXUNIQUESCAN|I_IND1|1||1(0)|00:00:01|
  |12|NESTEDLOOPS||1|28|2(0)|00:00:01|
  |*13|INDEXFULLSCAN|I_USER2|1|20|1(0)|00:00:01|
  |*14|INDEXRANGESCAN|I_OBJ4|1|8|1(0)|00:00:01|
  |15|NESTEDLOOPS||2|86|3(0)|00:00:01|
  |16|INDEXFULLSCAN|I_LINK1|2|52|1(0)|00:00:01|
  |17|TABLEACCESSCLUSTER|USER$|1|17|1(0)|00:00:01|
  |*18|INDEXUNIQUESCAN|I_USER#|1||0(0)|00:00:01|
  |19|NESTEDLOOPS||1|76|1(100)|00:00:01|
  |*20|HASHJOIN||1|57|1(100)|00:00:01|
  |*21|FIXEDTABLEFULL|X$KSUSE|1|32|0(0)|00:00:01|
  |22|VIEW|GV$_LOCK|10|250|0(0)|00:00:01|
  |23|UNION-ALL||||||
  |*24|FILTER||||||
  |25|VIEW|GV$_LOCK1|2|178|0(0)|00:00:01|
  |26|UNION-ALL||||||
  |*27|FIXEDTABLEFULL|X$KDNSSF|1|102|0(0)|00:00:01|
  |*28|FIXEDTABLEFULL|X$KSQEQ|1|102|0(0)|00:00:01|
  |*29|FIXEDTABLEFULL|X$KTADM|1|102|0(0)|00:00:01|
  |*30|FIXEDTABLEFULL|X$KTATRFIL|1|102|0(0)|00:00:01|
31|FIXEDTABLEFULL|X$KTATRFSL|1|102|0(0)|00:00:01|
  |*32|FIXEDTABLEFULL|X$KTATL|1|102|0(0)|00:00:01|
  |*33|FIXEDTABLEFULL|X$KTSTUSC|1|102|0(0)|00:00:01|
  |*34|FIXEDTABLEFULL|X$KTSTUSS|1|102|0(0)|00:00:01|
  |*35|FIXEDTABLEFULL|X$KTSTUSG|1|102|0(0)|00:00:01|
  |*36|FIXEDTABLEFULL|X$KTCXB|1|102|0(0)|00:00:01|
  |*37|FIXEDTABLEFIXEDINDEX|X$KSQRS(ind:1)|1|19|0(0)|00:00:01|
  ---------------------------------------------------------------------------------------------------
  PredicateInformation(identifiedbyoperationid):
  ---------------------------------------------------
  1-filter(EXISTS(SELECT0FROMSYS."X$KSQRS""R",SYS."X$KSUSE""S",((SELECT
  USERENV('INSTANCE')"INST_ID","LADDR""LADDR","KADDR""KADDR","SADDR""SADDR","RADDR"
  "RADDR","LMODE""LMODE","REQUEST""REQUEST","CTIME""CTIME","BLOCK""BLOCK"FROM(
  (SELECT"INST_ID""INST_ID","ADDR""LADDR","KSQLKADR""KADDR","KSQLKSES"
  "SADDR","KSQLKRES""RADDR","KSQLKMOD""LMODE","KSQLKREQ""REQUEST","KSQLKCTIM"
  "CTIME","KSQLKLBLK""BLOCK"FROMSYS."X$KDNSSF""X$KDNSSF"WHERE("KSQLKMOD"<>0OR
  "KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')ANDBITAND("KSSOBFLG",1)<>0)UNIONALL
  (SELECT"INST_ID""INST_ID","ADDR""LADDR","KSQLKADR""KADDR","KSQLKSES"
  "SADDR","KSQLKRES""RADDR","KSQLKMOD""LMODE","KSQLKREQ""REQUEST","KSQLKCTIM"
  "CTIME","KSQLKLBLK""BLOCK"FROMSYS."X$KSQEQ""X$KSQEQ"WHERE("KSQLKMOD"<>0OR
  "KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')ANDBITAND("KSSOBFLG",1)<>0))"GV$_LOCK1"
  WHEREUSERENV('INSTANCE')ISNOTNULL)UNIONALL(SELECT"INST_ID""INST_ID","ADDR"
  "LADDR","KSQLKADR""KADDR","KSQLKSES""SADDR","KSQLKRES""RADDR","KSQLKMOD"
  "LMODE","KSQLKREQ""REQUEST","KSQLKCTIM""CTIME","KSQLKLBLK""BLOCK"FROMSYS."X$KTADM"
  "X$KTADM"WHERE("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSOBFLG",1)<>0)UNIONALL(SELECT"INST_ID""INST_ID","ADDR""LADDR","KSQLKADR"
  "KADDR","KSQLKSES""SADDR","KSQLKRES""RADDR","KSQLKMOD""LMODE","KSQLKREQ"
  "REQUEST","KSQLKCTIM""CTIME","KSQLKLBLK""BLOCK"FROMSYS."X$KTATRFIL""X$KTATRFIL"WHERE
  ("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSOBFLG",1)<>0)UNIONALL(SELECT"INST_ID""INST_ID","ADDR""LADDR","KSQLKADR"
  "KADDR","KSQLKSES""SADDR","KSQLKRES""RADDR","KSQLKMOD""LMODE","KSQLKREQ"
  "REQUEST","KSQLKCTIM""CTIME","KSQLKLBLK""BLOCK"FROMSYS."X$KTATRFSL""X$KTATRFSL"WHERE
  ("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSOBFLG",1)<>0)UNIONALL(SELECT"INST_ID""INST_ID","ADDR""LADDR","KSQLKADR"
  "KADDR","KSQLKSES""SADDR","KSQLKRES""RADDR","KSQLKMOD""LMODE","KSQLKREQ"
  "REQUEST","KSQLKCTIM""CTIME","KSQLKLBLK""BLOCK"FROMSYS."X$KTATL""X$KTATL"WHERE
  ("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSOBFLG",1)<>0)UNIONALL(SELECT"INST_ID""INST_ID","ADDR""LADDR","KSQLKADR"
  "KADDR","KSQLKSES""SADDR","KSQLKRES""RADDR","KSQLKMOD""LMODE","KSQLKREQ"
  "REQUEST","KSQLKCTIM""CTIME","KSQLKLBLK""BLOCK"FROMSYS."X$KTSTUSC""X$KTSTUSC"WHERE
  ("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSOBFLG",1)<>0)UNIONALL(SELECT"INST_ID""INST_ID","ADDR""LADDR","KSQLKADR"
  "KADDR","KSQLKSES""SADDR","KSQLKRES""RADDR","KSQLKMOD""LMODE","KSQLKREQ"
  "REQUEST","KSQLKCTIM""CTIME","KSQLKLBLK""BLOCK"FROMSYS."X$KTSTUSS""X$KTSTUSS"WHERE
  ("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSOBFLG",1)<>0)UNIONALL(SELECT"INST_ID""INST_ID","ADDR""LADDR","KSQLKADR"
  "KADDR","KSQLKSES""SADDR","KSQLKRES""RADDR","KSQLKMOD""LMODE","KSQLKREQ"
  "REQUEST","KSQLKCTIM""CTIME","KSQLKLBLK""BLOCK"FROMSYS."X$KTSTUSG""X$KTSTUSG"WHERE
  ("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSOBFLG",1)<>0)UNIONALL(SELECT"INST_ID""INST_ID","KTCXBXBA"
  "LADDR","KTCXBLKP""KADDR","KSQLKSES""SADDR","KSQLKRES""RADDR","KSQLKMOD"
  "LMODE","KSQLKREQ""REQUEST","KSQLKCTIM""CTIME","KSQLKLBLK""BLOCK"FROMSYS."X$KTCXB"
  "X$KTCXB"WHERE("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSPAFLG",1)<>0))"GV$_LOCK"WHERE"SADDR"="S"."ADDR"AND"S"."KSUSENUM"=305AND
  "S"."INST_ID"=USERENV('INSTANCE')AND"R"."KSQRSID1"=:B1AND"RADDR"="R"."ADDR"))
  4-filter(("O"."TYPE#"<>1AND"O"."TYPE#"<>10OR"O"."TYPE#"=1AND(SELECT1FROM
  "SYS"."IND$""I"WHERE"I"."OBJ#"=:B1AND("I"."TYPE#"=1OR"I"."TYPE#"=2OR"I"."TYPE#"=3
  OR"I"."TYPE#"=4OR"I"."TYPE#"=6OR"I"."TYPE#"=7OR"I"."TYPE#"=9))=1)AND
  ("O"."TYPE#"<>4AND"O"."TYPE#"<>5AND"O"."TYPE#"<>7AND"O"."TYPE#"<>8AND
  "O"."TYPE#"<>9AND"O"."TYPE#"<>10AND"O"."TYPE#"<>11AND"O"."TYPE#"<>12AND
  "O"."TYPE#"<>13AND"O"."TYPE#"<>14AND"O"."TYPE#"<>22AND"O"."TYPE#"<>87AND
  "O"."TYPE#"<>88ORBITAND("U"."SPARE1",16)=0OR("O"."TYPE#"=4OR"O"."TYPE#"=5OR
  "O"."TYPE#"=7OR"O"."TYPE#"=8OR"O"."TYPE#"=9OR"O"."TYPE#"=10OR"O"."TYPE#"=11OR
  "O"."TYPE#"=12OR"O"."TYPE#"=13OR"O"."TYPE#"=14OR"O"."TYPE#"=22OR"O"."TYPE#"=87)
  AND(SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE'AND"U"."TYPE#"<>2OR
  "U"."TYPE#"=2AND"U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))OR
  EXISTS(SELECT0FROMSYS."USER$""U2",SYS."OBJ$""O2"WHERE"O2"."OWNER#"="U2"."USER#"
  AND"O2"."TYPE#"=88AND"O2"."DATAOBJ#"=:B2AND"U2"."TYPE#"=2AND
  "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))))))
  5-access("O"."SPARE3"="U"."USER#")
  7-access("O"."OWNER#"="U"."USER#")
  9-filter("O"."NAME"<>'_NEXT_OBJECT'AND"O"."NAME"<>'_default_auditing_options_'AND
  "O"."LINKNAME"ISNULLANDBITAND("O"."FLAGS",128)=0)
  10-filter("I"."TYPE#"=1OR"I"."TYPE#"=2OR"I"."TYPE#"=3OR"I"."TYPE#"=4OR
  "I"."TYPE#"=6OR"I"."TYPE#"=7OR"I"."TYPE#"=9)
  11-access("I"."OBJ#"=:B1)
  13-access("U2"."TYPE#"=2AND"U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edi
  tion_id')))
  filter("U2"."TYPE#"=2AND"U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edi
  tion_id')))
  14-access("O2"."DATAOBJ#"=:B1AND"O2"."TYPE#"=88AND"O2"."OWNER#"="U2"."USER#")
  18-access("L"."OWNER#"="U"."USER#")
  20-access("SADDR"="S"."ADDR")
  21-filter("S"."KSUSENUM"=305AND"S"."INST_ID"=USERENV('INSTANCE'))
  24-filter(USERENV('INSTANCE')ISNOTNULL)
  27-filter(("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSOBFLG",1)<>0)
  28-filter(("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSOBFLG",1)<>0)
  29-filter(("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSOBFLG",1)<>0)
  30-filter(("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSOBFLG",1)<>0)
  31-filter(("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSOBFLG",1)<>0)
  32-filter(("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSOBFLG",1)<>0)
  33-filter(("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSOBFLG",1)<>0)
  34-filter(("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSOBFLG",1)<>0)
  35-filter(("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSOBFLG",1)<>0)
  36-filter(("KSQLKMOD"<>0OR"KSQLKREQ"<>0)AND"INST_ID"=USERENV('INSTANCE')AND
  BITAND("KSSPAFLG",1)<>0)
  37-filter("R"."KSQRSID1"=:B1AND"RADDR"="R"."ADDR")
  统计信息
  ----------------------------------------------------------
  15recursivecalls
  70632dbblockgets
  982consistentgets
  3physicalreads
  0redosize
  667bytessentviaSQL*Nettoclient
  520bytesreceivedviaSQL*Netfromclient
  2SQL*Netroundtripsto/fromclient
  0sorts(memory)
  0sorts(disk)
  2rowsprocessed

1 2 3  下一页

Tags:访问 DBA OBJECTS

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接