About Replacing Databases - Teradata Data Mover

Teradata Data Mover User Guide

Product
Teradata Data Mover
Release Number
16.00
Published
December 2016
Language
English (United States)
Last Update
2018-03-29
dita:mapPath
rdo1467305237457.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-4101
lifecycle
previous
Product Category
Analytical Ecosystem

When you copy all objects in a Teradata Database by specifying <database selection="included">, Data Mover copies all of the tables from the source to the target, but leaves any additional tables that exist in the target database intact. For example, if the source database contains tables A, B, and C and the target contains tables A, B, C, and D, tables A, B, and C are copied from the source to the target database, and table D remains on the target database.

The database replacement feature enables you to completely overwrite or "replace" a database on the target system by eliminating all of the objects in the target database and replacing them with those on the source. Any additional tables that existed on the target database but not on the source are removed. You replace a database by setting an optional replaceDatabase attribute as true, as shown below:
<database selection="included" replaceDatabase="true">
     <name>MyDatabase</name>
 </database>

The default value for the replaceDatabase attribute is "false" if not specified. If the attribute is set as <replaceDatabase="false"> or is not specified at all, the tables on the target that do not exist on the source remain on the target after the entire database is copied.