尊龙凯时人生就是博

OracleÅÌÎʱíËø״̬ҪÁìÏê½â

OracleÅÌÎʱíËø״̬ҪÁìÏê½â

ÔÚÊý¾Ý¿â²Ù×÷ÖÐ £¬±íËøÊÇÒ»¸öºÜÊÇÖ÷ÒªµÄ¿´·¨ £¬Ëû»áÓ°Ïìµ½Êý¾Ý¿âµÄÐÔÄܺͲ¢·¢¶È¡£±¾ÎĽ«ÏêϸÏÈÈÝÔÚOracleÊý¾Ý¿âÖÐÅÌÎʱíËø״̬µÄÒªÁì £¬²¢¸ø³öÏêϸµÄ´úÂëʾÀý¡£

1. ÅÌÎʱíËø״̬µÄÒªÁì

ÔÚOracleÊý¾Ý¿âÖÐ £¬ÎÒÃÇ¿ÉÒÔͨ¹ýÔÚϵͳÊÓͼÖÐÅÌÎÊÀ´»ñÈ¡±íËø״̬ÐÅÏ¢¡£ÏÂÃæÊÇһЩ³£ÓõÄϵͳÊÓͼ£º

V$LOCK£ºÏÔʾÊý¾Ý¿âÖи߼¶ËøÐÅÏ¢µÄÊÓͼ

DBA_BLOCKERS£ºÏÔʾĿ½ñµÄ»á»°IDºÍËø¶¨»á»°ID

DBA_WAITERS£ºÏÔʾĿ½ñµÄ»á»°IDºÍÆÚ´ý»á»°ID

DBA_DML_LOCKS£ºÏÔʾĿ½ñ»á»°³ÖÓкÍÆÚ´ýµÄDMLËøÐÅÏ¢

2. Ïêϸ´úÂëʾÀý

2.1 ÅÌÎʱíÉϵÄËø¶¨»á»°

SELECT c.object_name,
       b.sid,
       b.serial#,
       b.username,
       b.status,
       b.server,
       l.locked_mode,
       l.lock_type
FROM   v$locked_object l,
       dba_objects c,
       v$session b
WHERE  l.object_id = c.object_id
AND    l.session_id = b.sid;

µÇ¼ºó¸´ÖÆ

Õâ¶Î´úÂë¿ÉÒÔÅÌÎʳöÄ¿½ñÊý¾Ý¿âÖи÷¸ö±íµÄËø¶¨»á»°ÐÅÏ¢ £¬°üÀ¨»á»°ID¡¢³ÖÓÐËøµÄÓû§¡¢ËøÀàÐ͵ȡ£

2.2 ÅÌÎÊÄ¿½ñ»á»°µÄÆÚ´ýºÍ³ÖÓеÄËøÐÅÏ¢

SELECT session_id, 
       lock_type,
       mode_held,
       mode_requested
FROM   dba_dml_locks
UNION
SELECT holding_session session_id,
       holding_cursor_type lock_type,
       MODE_HELD mode_held,
       MODE_REQUESTED mode_requested
FROM   dba_kgl_locks

µÇ¼ºó¸´ÖÆ

Õâ¶Î´úÂë¿ÉÒÔÅÌÎÊÄ¿½ñ»á»°³ÖÓкÍÆÚ´ýµÄËøÐÅÏ¢ £¬¿ÉÒÔ×ÊÖúÎÒÃǸüºÃµØÃ÷È·Ä¿½ñÊý¾Ý¿âÖÐËøµÄÏêϸÇéÐΡ£

3. ×ܽá

ͨ¹ýÒÔÉϵÄÏÈÈÝ £¬ÎÒÃÇÏàʶÁËÔÚOracleÊý¾Ý¿âÖÐÅÌÎʱíËø״̬µÄÒªÁì £¬²¢¸ø³öÁËÏêϸµÄ´úÂëʾÀý¡£ÔÚÏÖʵ²Ù×÷ÖÐ £¬Í¨¹ý¼à¿Ø±íËø״̬ £¬ÎÒÃÇ¿ÉÒÔ¸üºÃµØÓÅ»¯Êý¾Ý¿âµÄÐÔÄÜ £¬Ìá¸ßϵͳµÄ²¢·¢´¦ÀíÄÜÁ¦¡£Ï£Íû±¾ÎĶÔÄúÓÐËù×ÊÖú¡£

ÒÔÉϾÍÊÇOracleÅÌÎʱíËø״̬ҪÁìÏê½âµÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是博

18523999891

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

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

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