Relocating an Entire Database - Teradata Data Mover

Teradata Data Mover User Guide

Product
Teradata Data Mover
Release Number
16.10
Published
June 2017
Language
English (United States)
Last Update
2018-03-29
dita:mapPath
kmo1482331935137.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-4101
lifecycle
previous
Product Category
Analytical Ecosystem
You can relocate all objects from a source database to a different target database. To copy all objects in a source to a different target database, add the target_database element and specify the name of the target database. You can only specify target_database if you specify selection = "included". Specifying the target_database element when selection= "all" results in a create time error.

The target database must exist before creating the job. Data Mover does not create the database on the target system.

  1. Add the target_database element.
  2. Specify the name of the target database.
In the following example, objects in the database MySourceDB are copied to the target database MyTargetDB.
<database selection="included"> 
	<name>MySourceDB</name>
 <target_database>
  <name>MyTargetDB</name>
 </target_database>
</database>

When relocating an entire database, Teradata ARC does not automatically copy the join and hash indexes from the source database. The join or hash index to be copied to the target needs to be specified in the XML. The index is created on the relocated table on the target. The join or hash index itself is not relocated. In the following example, hash index MyDB.orders_hi is copied to the target database MyDB. Because the associated table MyDB.Orders is being relocated to MyTargetDB, the hash Index is created on the table MyTargetDB.Orders on the target.

<database selection="included">
 <name>MyDB</name>
 <target_database>
  <name>MyTargetDB</name>
 </target_database>
</database>
   <indices>
    <index selection="included">
     <name>Orders_hi</name>
      <index_database>MyDB</index_database>
      <index_type>HASH_INDEX</index_type>
      <associate_table>
       <database>MyDB</database>
       <table>Orders</table>
     </associate_table>
    </index>
   </indices>