Transfer a table to a different database

Database
Enthusiast

Transfer a table to a different database

Hi,
Is there a way to transfer a table from one database to another database in teradata ?
thanks,
Nagendhran
9 REPLIES
Enthusiast

Re: Transfer a table to a different database

Hi,
You can use copy objects option from the file menu(F8 command) from the Teradata Administrator(winddi) to accomplish this task.

--Regards,
Aravind
Enthusiast

Re: Transfer a table to a different database

Hi,
Thanks for your suggestion aravind.
rgds,
Nagendhran
Teradata Employee

Re: Transfer a table to a different database

Note that "Copy Objects" in Teradata Administrator only copies the definition (in effect does SHOW on one system and submits the resulting DDL on the other). It does not copy the data. There are many possible ways to move the data, including via ARCHIVE and COPY with the Teradata ARC utility.
Enthusiast

Re: Transfer a table to a different database

can you eloborate more on this fred ?
Enthusiast

Re: Transfer a table to a different database

If u have access to unix command prompt then....invoke arcmain.
--Command-line invocation of Teradata ARC from Solaris, MPRAS,HP-UX, and AIX:
arcmain outlog=arcall.out
--The above command line calls the ARCMAIN executable.

--The default is archive to disk if no IOMODULE or IOPARM are specified. The input file named arcall.in contains ARCMAIN commands. The “<“ redirects the input file to ARCMAIN.

--The following example illustrates how a database is copied:
COPY DATA TABLE (Personnel)
(FROM (OldPersonnel), NO FALLBACK)
,FILE = ARCHIVE;
--The database named Personnel is restored from an archived database named OldPersonnel with all tables defined as nonfallback after the copy operation.
The above information is there in Teradata manual "Teradata Archive/Recovery Utility Reference"
Enthusiast

Re: Transfer a table to a different database

arcmain outlog=arcall.out
--The above command line calls the ARCMAIN executable.
Enthusiast

Re: Transfer a table to a different database

arcmain outlog=arcall.out < arcall.in
Enthusiast

Re: Transfer a table to a different database

If you want to transfer the table with in the same node, you can use following syntax.
suppose you have db1 with t1 and you want to transfer t1 into db2, then you can create a new table t1 in db2 as follows

Create table db2.t1 as db1.t1 with data;

after create table completes, you can delete db1.t1.

Re: Transfer a table to a different database

Hi use following script for Teradata Archive

logon servername/dbc,dbc;DUMP DATA TABLES(Database)

(USE READ LOCK,

RELEASE LOCK,

FILE=NVDSID1;

logon servername /dbc,dbc;COPY DATA TABLES(Database)

(RELEASE LOCK,

FILE=NVDSID1;

.logoff;

.quit;

save these two scripts are different and run @ command propmt with the following syntax

ARCMAIN SESSIONS=8 CATALOG OUTLOG=ARCALL.OUT <ARCALL.IN(MENCTION HERE FIRST SCRIPT) DO SAME FOR WITH COPY SCRIPT

Have fun

cheers....