2pc pending ó¸® »ç¿ë¿¹
ÀÛ¼ºÀÚ °ü¸®ÀÚ ÀÛ¼º½Ã°£ 2008-01-18 16:12:25
 

######################

#2pc pending ó¸® »ç¿ë¿¹

######################



sqlplus as sysdba (sys±ÇÇÑÀ¸·Î Á¢¼Ó)



spool 20060715_2pc_pending
set time on
set timing on
set echo on

set pages 100



select * from dba_2pc_pending;

alter session set "_smu_debug_mode" = 4;

exec dbms_transaction.purge_lost_db_entry('8.16.204198');

commit;

select * from dba_2pc_pending;

spool off







#########################
# 2pc pending ó¸® ÀýÂ÷ #
#########################

DISTRIBUTED TRANSACTION TROUBLESHOOTING (ORA-1591ÇØ°á ¹æ¹ý)

STEP 1: alert.log fileÀ» checkÇÑ´Ù.
STEP 2: network ȯ°æÀ» È®ÀÎÇÑ´Ù.
STEP 3: RECO process°¡ ¶° ÀÖ´ÂÁö È®ÀÎÇÑ´Ù.
        os> ps -ef | grep reco
STEP 4: DBA_2PC_PENDINGÀ» Á¶È¸ÇØ º»´Ù.
        SQL>select local_tran_id, global_tran_id, state, mixed, host, commit#
        from dba_2pc_pending;
STEP 7: DBA_2PC_PENDINGÀÇ MIXED columnÀ» È®ÀÎÇÑ´Ù.
      - MIXED°ªÀÌ NOÀÎ °æ¿ì : STEP 8 ¼öÇà
      - MIXED°ªÀÌ YESÀÎ °æ¿ì: STEP 9 ¼öÇà

STEP 8: DBA_2PC_PENDINGÀÇ STATE columnÀÇ °ªÀ» È®ÀÎÇÑ´Ù.

CASE 8-1: STATE field ---> COMMITTEDÀÎ °æ¿ì
          SQL>exec dbms_transaction.purge_lost_db_entry('<TRANS_ID>');
          SQL>commit;

CASE 8-2: STATE field ---> PREPAREDÀÎ °æ¿ì  <-- Lock ÀλóÅÂ
          SQL>rollback force '<TRANS_ID>'; ȤÀº
          SQL>commit force '<TRANS_ID>';

CASE 8-3: STATE field ---> COLLECTINGÀÎ °æ¿ì
          SQL>exec dbms_transaction.purge_lost_db_entry('<TRANS_ID>');
          SQL>commit;

CASE 8-4: STATE field ---> FORCED ROLLBACK/FORCED COMMIT ÀÎ °æ¿ì
          SQL>exec dbms_transaction.purge_lost_db_entry('<TRANS_ID>'); 
          SQL>commit;

STEP 9: ºÒÀÏÄ¡ »çÇ×À» ÆľÇÇÏ°í DBA_2PC_PENDINGÀ» Á¤¸®ÇÑ´Ù.
  MIXED°¡ YESÀÎ »óÅ¿¡¼­, inconsistency¸¦ ¹Þ¾ÆµéÀÌ°í DBA_2PC_PENDING view¸¦
  Á¤¸®ÇÏ·Á¸é ´ÙÀ½°ú °°ÀÌ ¼öÇàÇÑ´Ù.
          SQL>exec dbms_transaction.purge_mixed('1.8.238');
          SQL>commit;

================================================================
exec dbms_transaction.purge_mixed('1.8.238') ¿¡·¯¹ß»ý½Ã Á¶Ä¡¿ä·É
¿¡·¯³»¿ë
ERROR at line 1:
ORA-30019: Illegal rollback Segment operation in Automatic Undo mode
ORA-06512: at "SYS.DBMS_TRANSACTION", line 65
ORA-06512: at "SYS.DBMS_TRANSACTION", line 85
ORA-06512: at line 1

Á¶Ä¡
alter session set "_smu_debug_mode" = 4;

# END ######################################################################
###

ŽÄ(taesikweb)



######
pending ½ºÅ©¸³Æ®

select 'exec dbms_transaction.purge_lost_db_entry('''||local_tran_id||''');'  from dba_2pc_pending;

####

editplus¿¡¼­
°Ë»ö ->
¹Ù²Ù±â -> ãÀ»¸» (Áٹٲٱâ) \n
¹Ù²Ü ¸» -> \ncommit;\n


¸ñ·Ï | ÀÔ·Â | ¼öÁ¤ | ´äº¯ | »èÁ¦