title: How to move Indexes into another TableSpace
body: <p>how to move indexes to another tablespace</p>
  <pre><code>select owner, index_name, TABLE_NAME, a.TABLESPACE_NAME 
  from all_indexes a where a.TABLE_NAME = 'REFUND';
  </code></pre>
  <p><a href="https://i.stack.imgur.com/pGoxP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pGoxP.png" alt="enter image description here" /></a></p>
  <pre><code>ALTER INDEX CBS.PK_REFUND_ID REBUILD TABLESPACE T_IDX;
  
  </code></pre>
  <p>ORA-14086: A partitioned index may not be rebuilt as a whole.</p>
  <p><a href="https://i.stack.imgur.com/Z8baq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z8baq.png" alt="enter image description here" /></a></p>
  <p>I can't execute this statement because I don't know in which partition the index is</p>
  <pre><code>ALTER INDEX PK_REFUND_ID REBUILD PARTITION xxxxxx TABLESPACE T_IDX;
  
  </code></pre>