Relocate an Entire Database | Teradata Data Mover - 17.11 - Relocating an Entire Database - Teradata Data Mover

Teradata® Data Mover User Guide

Product
Teradata Data Mover
Release Number
17.11
Release Date
October 2021
Content Type
User Guide
Publication ID
B035-4101-091K
Language
English (United States)
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 DSA 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.
When using DSA on databases with versions earlier than 16.20, specifying an additional indices section in the job is not supported. A separate job must be created to copy only indices when using DSA to relocate an entire database.
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>
    </index>
   </indices>