Example: COPY - Teradata Tools and Utilities

Teradata® Archive/Recovery Utility Reference

Product
Teradata Tools and Utilities
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-06-05
dita:mapPath
fac1527114221922.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2412
Product Category
Teradata Tools and Utilities

In the following example, the first table is copied to a different table name, and the next two tables are copied with the same table name.

COPY DATA TABLES (test.test1) (FROM (oldtest.test1))
,(test2.test)
,(test3.test)
,RELEASE LOCK
,FILE = ARCHIVE;

If the configuration of the source and target platforms are different, copy cluster archives only to all AMPs or specific AMPs.

Use these options with all types of copy operations:
  • FROM (dbname.tablename)
  • RELEASE LOCK
  • NO BUILD
  • CLUSTER = nnn
  • AMP = n
  • FILE = name
These options are suitable only for data table copy operations, and only with dictionary and data table copies:
  • WITH JOURNAL TABLE (dbname.tablename)
  • NO FALLBACK
  • NO JOURNAL

Journal copy options are not supported after the target system is reconfigured. Journal table copy options define target (receiving) tables for change image journaling.

Teradata ARC uses the journal table copy options to:
  • Select the set of journal images from an archive to copy.
  • Name the tables in the receiving system to which the images apply during rollforward or rollback operations.

When NO BUILD is specified, Teradata ARC leaves the restored journal in a prebuild state. Teradata ARC does not allow roll operations on journal tables in this state, and generates an error message if an attempt is made to roll this journal back or forward.

If data tables are copied into a database that does not already have tables with those names, Teradata ARC creates the required tables. This is true only for data tables. Journal tables can never be created by a copy operation. They must exist in the receiving database. Similarly, do not create receiving databases with COPY.

COPY preserves table names without converting them to upper case and returns these table names in their original format.