Wednesday, February 8, 2017

Backup only DDL by using ARCMAIN Utility in Teradata


================================================
Backup All database objects only without data
================================================

I want to take only the database objects DDL(Table definitions(except data),views,procedures,functions,Macros)  from a database using ARCMAIN.I don't want to mention all the object's names in the ARCMAIN script (becuase we are having 600 Tables,300 Macros and 185 views).

Is there any option to archive this?

 From the Database Administration manual:

 "A dictionary table archive contains all table, view, macro and trigger definitions in the
 database, and dictionary entries for stored procedures and user-defined functions. 

  A restore of a dictionary archive restores the definitions of all data tables, views, macros,       triggers, and stored procedures. However, it does not restore any data."

To accomplish a dictionary table archive review the ARCHIVE command in the Archive/Recover Utility manual. The following command should be pretty close to what you are looking for:

ARCHIVE DICTIONARY TABLES ALL;

Run this in arcmain...

.logon ******;
archive dictionary tables (dbc) ALL,
release lock,
output row count,
file = filename;
logoff;

No comments:

Post a Comment