When oracle detects rollback for the remaining time to operate the oracle database, a large transaction needs to be rolled back, which is very slow. It depends on how long it takes to roll back. Find the following SQL statement on the Internet:
select * from v$transaction;
But when I run it, return: ORA-00942: The table or view does not exist. It is like this: the view v $ is not visible under a common user, and the conn/as sysdba is just fine. Execute the return statement again: you can find a segment under the unselected row to see how long it will take to roll back.
when transaction will finish rollback----------------------------------------------------------------------------------- Script: rolling_back.sql-- Purpose: to predict when transactions will finish rolling back-- For: 9.0+---- Copyright: (c) Ixora Pty Ltd-- Author: Steve Adams---------------------------------------------------------------------------------@save_sqlplus_settingsset serveroutput onset feedback offpromptprompt Looking for transactions that are rolling back ...promptdeclare cursor tx isselect s.username, t.xidusn, t.xidslot, t.xidsqn, x.ktuxesizfrom sys.x$ktuxe x, sys.v_$transaction t, sys.v_$session swhere x.inst_id = userenv('Instance') and x.ktuxesta = 'ACTIVE' and x.ktuxesiz 1 and t.xidusn = x.ktuxeusn and t.xidslot = x.ktuxeslt and t.xidsqn = x.ktuxesqn and s.saddr = t.ses_addr; user_name varchar2(30); xid_usnnumber; xid_slot number; xid_sqnnumber; used_ublk1 number; used_ublk2 number;begin open tx; loopfetch tx into user_name, xid_usn, xid_slot, xid_sqn, used_ublk1;exit when tx%notfound;if tx%rowcount = 1then sys.dbms_lock.sleep(10);end if;select sum(ktuxesiz)into used_ublk2from sys.x$ktuxewhere inst_id = userenv('Instance') and ktuxeusn = xid_usn and ktuxeslt = xid_slot and ktuxesqn = xid_sqn and ktuxesta = 'ACTIVE';if used_ublk2 < used_ublk1then sys.dbms_output.put_line(user_name ||'''s transaction ' ||xid_usn || '.' ||xid_slot || '.' ||xid_sqn ||' will finish rolling back at approximately ' ||to_char( sysdate + used_ublk2 / (used_ublk1 - used_ublk2) / 6 / 60 / 24, 'HH24:MI:SS DD-MON-YYYY') );end if; end loop; if user_name is null thensys.dbms_output.put_line('No transactions appear to be rolling back.'); end if;end;/prompt@restore_sqlplus_settings