사용자 도구

사이트 도구


dbms:oracle:admin:flashback:transaction_backout

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
dbms:oracle:admin:flashback:transaction_backout [2016/05/21 08:22]
starlits
dbms:oracle:admin:flashback:transaction_backout [2016/05/21 08:32] (현재)
starlits
줄 27: 줄 27:
 </code> </code>
   - Query flashback_transaction_query to get the transaction id and the list of all transactional changes from the undo data <code>   - Query flashback_transaction_query to get the transaction id and the list of all transactional changes from the undo data <code>
-select xid, table_name, operation, undo_sql +select xid, table_name, operation, undo_sql --,start_timestamp,commit_timestamp 
 from flashback_transaction_query  from flashback_transaction_query 
-where table_name = 'COUNTRIES';+where table_name IN ('COUNTRIES','REGIONS'); 
 +</code> 
 +  - Now use the transaction_backout procedure with the cascade option to get back all dependent transactions to keep the data consistency. You can pass the list of all transactions to the variable which was declared with default data type:  xid_array. In this example, use only one transaction <code> 
 +declare 
 +    v_txid xid_array;   
 +begin 
 +    v_txid:=sys.xid_array('0800130091020000');  
 +    dbms_flashback.transaction_backout(1,v_txid,dbms_flashback.cascade); 
 +end; 
 +</code> 
 +  - Do not forget to commit <code> 
 +commit; 
 +</code> 
 +  - Now query the flashback_transaction_query view to see which transactions run to roll back the changes. Do not forget to query the two tables <code> 
 +select xid, table_name, operation, undo_sql --,start_timestamp,commit_timestamp  
 +from flashback_transaction_query  
 +where table_name IN ('COUNTRIES','REGIONS');
 </code> </code>
dbms/oracle/admin/flashback/transaction_backout.1463786571.txt.gz · 마지막으로 수정됨: 2016/05/21 08:22 저자 starlits