How to make use of ARCMAIN utility to take DB backup.

Tools
tvn
Enthusiast

How to make use of ARCMAIN utility to take DB backup.

I was asked to take database backup using ARCMAIN. But, not sure how to start using this utility.
Expecting valuable helps from the group.

thanks in advance.
14 REPLIES
Junior Contributor

Re: How to make use of ARCMAIN utility to take DB backup.

There's a manual on ARC:
Teradata Archive/Recovery Utility Reference

Dieter
tvn
Enthusiast

Re: How to make use of ARCMAIN utility to take DB backup.

Thanks Dieter. Let me go through the doc.

Re: How to make use of ARCMAIN utility to take DB backup.

Example for a Backup of tables:
-------------------------------
logon ZZZZ/YYYY,XXXX;

ARCHIVE DATA TABLE

(DATABASENAME.TABLENAME1),
(DATABASENAME.TABLENAME2),
(DATABASENAME.TABLENAME3),

RELEASE LOCK,

FILE=NVDSID1;

Example for a Restore of tables:
--------------------------------
logon ZZZZ/YYYY,XXXX;

COPY DATA TABLES

(DATABASENAME.TABLENAME11) (FROM(DATABASENAME.TABLENAME1)),
(DATABASENAME.TABLENAME12) (FROM(DATABASENAME.TABLENAME2)),
(DATABASENAME.TABLENAME13) (FROM(DATABASENAME.TABLENAME3)),

RELEASE LOCK,

FILE=NVDSID1;
Enthusiast

Re: How to make use of ARCMAIN utility to take DB backup.

Hi Mauricio,

Thanks for your script and it has been very helpful to to move a bunch of tables without restoring them. I have a question on that. what if the file is on a different directory /temp/data/NVDSID1

FILE=/temp/data/NVDSID1

is this correct?
please advise
Enthusiast

Re: How to make use of ARCMAIN utility to take DB backup.

You can also use DUMP in place of ARCHIVE

-------------------------------
logon ZZZZ/YYYY,XXXX;

DUMP DATA TABLES

(DATABASENAME.TABLENAME1),
(DATABASENAME.TABLENAME2),
(DATABASENAME.TABLENAME3),

USE READ LOCK,
RELEASE LOCK ,

FILE=NVDSID1;
LOGOFF;

and Satish , yes you can use file name FILE=/temp/data/NVDSID1 to store archived data
Fan

Re: How to make use of ARCMAIN utility to take DB backup.

03/22/2015 04:20:53  .logoffoot/Teradata/financial_custonline.data,

03/22/2015 04:20:53  *** Failure ARC0226:"/root/T contain too many characters.

I am getting the above error when i run the below archive script.

.logon 127.0.0.1/dbc,dbc;

archive data tables (financial.custonline),

release lock,

file="/root/Teradata/NVDSID1",

.logoff

Am I missing something ? Also, would I be allowed to change the file-name to any other name?


Fan

Re: How to make use of ARCMAIN utility to take DB backup.

I am trying to run the below Archive script:

.logon 127.0.0.1/dbc,dbc;

archive data tables (financial.custonline),
release lock,
file="/root/Teradata/custonline_Data";
.logoff;

Is it possible to change the filename in the archival script ? I need to maintain the data in specific location.

What is the best practice to perform ARC of tables ?


Junior Contributor

Re: How to make use of ARCMAIN utility to take DB backup.

You can't use more than 8 characters for FILE or add a path within the ARC script:

archive data tables (financial.custonline),
release lock,
file=ARCHIVE;

Then you use a runtime parameter to map ARCHIVE to the actual name:

ARCMAIN FILEDEF=(ARCHIVE,/root/Teradata/custonline_Data) < yourscript

Re: How to make use of ARCMAIN utility to take DB backup.

Hi, 

Is it anyway to read the ARCMAIN file output?

We had an old Arcmain file, wondering if there is any way to read it.