1 Reply Latest reply: Oct 11, 2013 4:39 AM by Anar Godjaev RSS

    move table in tablespace

      Could you please move and write me as a script tables in tablespace ?

        • 1. Re: move table in tablespace
          Anar Godjaev

          HI,

           

          RHELSENSEI wrote:

           

          Could you please move and write me as a script tables in tablespace ?

           

          1) Move Table script

           

          SELECT    'ALTER TABLE '

                 || owner

                 || '.'

                 || table_name

                 || ' MOVE TABLESPACE TABLESPACE_NAME;'

            FROM dba_tables

          WHERE owner LIKE 'TABLE_NAME%';

           

          2)  Rebuld index script

           

          SELECT    'ALTER INDEX '

                 || owner

                 || '.'

                 || index_name

                 || ' REBUILD TABLESPACE TABLESPACE_NAME;'

            FROM dba_indexes

          WHERE owner LIKE 'TABLE_NAME%';

           

          Thank you