title: Oracel DB Move huge size partition using transportable tablespace in shell script
body: <p>we have a huge DB with daily 20Mil records,</p>
  <p>We have an interval partitioned table on creation time column(filled with Sysdate at before insert trigger)</p>
  <p>As this data are important and cannot be purged and storage runs out after some time, We have used <strong>impdp</strong> and <strong>expdp</strong> to archive old data(we keep few months) and monthly export one partition and import it at archive DB</p>
  <p>Disadvantage of this scenario is <strong>Dropping exported partition after complete import, Does not completely free the storage</strong>, it seems our tablespaces are the problem</p>
  <p>Another disadvantage is the data is keep growing and export and import time has reached more than mere hours and it's nearly 2 days, which affects our service quality</p>
  <p>Newly we're thinking about using <strong>Transportable Tablespaces</strong></p>
  <p>I'm not what scenario to use here</p>
  <p>Is this right to do this:</p>
  <ol>
  <li>daily create a tablespace with a datafile</li>
  <li>make new tablespace transportable</li>
  <li>alter user and set it's <code>default tablespace</code> to our new one</li>
  <li>after some time when data are old, export table using:</li>
  </ol>
  <pre><code>expdp transport_tablespaces={our new tablespace}
  </code></pre>
  <ol start="5">
  <li>copy data file from source DB to destination DB</li>
  <li>import at destination DB using:</li>
  </ol>
  <pre><code>impdp transport_datafiles='/path/to/data/{data file name}.dbf'
  </code></pre>
  <ol start="7">
  <li>if anything went well, drop source partition and free the space</li>
  </ol>
  <p>Personally, I'm not sure if my scenario is right, did I understand <strong>Transportable Tablespace</strong> correctly?</p>
  <p>If my scenario is correct, Can you provide a shell-script to automate this to be done</p>