SELECT * FROM dba_2pc_pending;
SELECT * FROM pending_sessions$;
SELECT * FROM pending_sub_sessions$;
SELECT * FROM dba_2pc_neighbors;
SELECT XID, START_TIME, STATUS from v$transaction;
The DBMS_LOGSTDBY.BUILD procedure waits for all existing transactions to complete. Long-running transactions executed on the primary database will affect the timeliness of this command. Looks like there are still some open Transactions on this Database started before the Build. The Procedure waits for all open Transactions to complete.
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: SYS
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
enq: TX - contention 705 2.93 2063.57
官方文档中这样解释:
The DBMS_LOGSTDBY.BUILD procedure waits for all existing transactions to
complete. Long-running transactions executed on the primary database will affect the
timeliness of this command.
The DBMS_LOGSTDBY.BUILD procedure uses Flashback Query to obtain a consistent
snapshot of the data dictionary that is then logged in the redo stream. Oracle
recommends setting the UNDO_RETENTION initialization parameter to 3600 on both
the primary and logical standby databases