/* ****************************************************** */
/* @c:\oracle\sql\chaining.sql                            */
/*                                                        */
/* Owner: R.Kupcunas                                      */
/* Date:  01-MAY-95                                       */
/*                                                        */
/* Table chain analyze script                             */
/* if necessary run the script:                           */
/*              $ORACLE_HOME/rdbms/admin/utlchain.sql     */
/* ****************************************************** */

spool chaining.rslt

delete from chained_rows
  where owner_name = '&&TABLE_OWNER' and
        table_name = '&&TABLE_NAME';

analyze table &&TABLE_OWNER..&&TABLE_NAME 
      list chained rows into chained_rows;

select * from chained_rows
  where owner_name = '&&TABLE_OWNER' and
        table_name = '&&TABLE_NAME';

select count(*) from chained_rows
  where owner_name = '&&TABLE_OWNER' and
        table_name = '&&TABLE_NAME';

undefine TABLE_OWNER;
undefine TABLE_NAME;
spool off

