×ðÁú¿­Ê±

oracleÉó²éÀú³ÌÊÇ·ñ±»Ëø

ÓÐÎåÖÖÒªÁì¿ÉÒÔ¼ì²é oracle Àú³ÌÊÇ·ñ±»Ëø£ºÊ¹Óà v$session ºÍ v$session_wait£¬²éÕÒ°üÀ¨¡°lock¡±µÄÆÚ´ýÊÂÎñ¡£Ê¹Óà v$lock ÕÒµ½Ä¿½ñ³ÖÓÐËøµÄ»á»°¡£Ê¹Óà gv$lock ²éÕÒËùÓÐÊý¾Ý¿â¹æÄ£µÄËø¡£Ê¹Óà v$locked_object ²éÕÒÄ¿½ñ±»Ëø¶¨µÄÊý¾Ý¿â¹¤¾ß¡£Ê¹Óà v$transaction ÕÒµ½ÕýÔÚÆÚ´ýËø¶¨µÄËùÓÐÊÂÎñ¡£

ÔõÑùÉó²é Oracle Àú³ÌÊÇ·ñ±»Ëø £¿

ÒªÁì 1£ºÊ¹Óà v$session ºÍ v$session_wait

SELECT
  s.sid,
  s.serial#,
  s.status,
  sw.event,
  sw.wait_time
FROM v$session s
INNER JOIN v$session_wait sw
  ON s.sid = sw.sid
WHERE
  sw.event LIKE '%lock%';

µÇ¼ºó¸´ÖÆ

´ËÅÌÎÊ·µ»ØËùÓб»Ëø¶¨µÄ»á»°¼°ÆäÆÚ´ýÊÂÎñºÍÆÚ´ýʱ¼ä¡£

ÒªÁì 2£ºÊ¹Óà v$lock

SELECT
  *
FROM v$lock
WHERE
  request > 0;

µÇ¼ºó¸´ÖÆ

´ËÅÌÎÊ·µ»ØËùÓÐÄ¿½ñ³ÖÓÐËøµÄ»á»°¡£

ÒªÁì 3£ºÊ¹Óà gv$lock

SELECT
  *
FROM gv$lock
WHERE
  request > 0;

µÇ¼ºó¸´ÖÆ

´ËÅÌÎÊÀàËÆÓÚ v$lock£¬µ«ËüÏÔʾËùÓÐÊý¾Ý¿â¹æÄ£µÄËø¡£

ÒªÁì 4£ºÊ¹Óà v$locked_object

SELECT
  *
FROM v$locked_object
WHERE
  object_id > 0;

µÇ¼ºó¸´ÖÆ

´ËÅÌÎÊ·µ»ØÄ¿½ñ±»Ëø¶¨µÄÊý¾Ý¿â¹¤¾ß¡£

ÒªÁì 5£ºÊ¹Óà v$transaction

SELECT
  *
FROM v$transaction
WHERE
  status = 'WAIT WAIT';

µÇ¼ºó¸´ÖÆ

´ËÅÌÎÊ·µ»ØÕýÔÚÆÚ´ýËø¶¨µÄËùÓÐÊÂÎñ¡£

ÒÔÉϾÍÊÇoracleÉó²éÀú³ÌÊÇ·ñ±»ËøµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±ÊµÊ±ÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±

13452372176

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
¡¾ÍøÕ¾µØͼ¡¿¡¾sitemap¡¿