这样可以得到表的链接和迁移信息
ANALYZE TABLE sales.order_hist LIST CHAINED ROWS;SELECT owner_name, table_name, head_rowid FROM chained_rows WHERE table_name = ’ORDER_HIST’;You can eliminate migrated rows using this SQL*Plus script:accept table_name prompt ’Enter the name of the table with migrated rows: ’
set echo off
drop table migrated_rows;
drop table chained_rows;@?/rdbms/admin/utlchain
set echo on
spool fix_mig
analyze table &table_name list chained rows;
create table migrated_rows as select orig.* from &table_name orig, chained_rows cr
where orig.rowid = cr.head_rowid and cr.table_name = upper(’&table_name’);
delete from &table_name where rowid in ( select head_rowid from chained_rows );
insert into &table_name select * from migrated_rows;
spool offWhen using this script, you must disable any foreign key constraints that will be
violated when the rows are deleted.