Help me to get the backup of ONLY DBC tables DDL (Not data).

Database

Help me to get the backup of ONLY DBC tables DDL (Not data).

Hi,

I am new to Teradata technology.

Can anybody let me know, How to get the DDL backup (Only DDL backup, Not Data backup) of DBC tables. ???

I need to collect the DDL's of all the tables which resides (come under) in DBC database. If in case any disaster, i want to use these DDL's at the time of recovery.

Kindly share the required query OR required table so that I will get the required DDL's.

Regards,

Deepak Dhabade

3 REPLIES

Re: Help me to get the backup of ONLY DBC tables DDL (Not data).

You can get from BAR.

Also:

select 'show table ' || trim(databasename) ||'.'|| trim(tablename) ||';'

     from dbc.tables

     where databasename = 'DBC'

You can add more filter if you wish to.

You can also check requesttext field, if not latered.

Re: Help me to get the backup of ONLY DBC tables DDL (Not data).

To recover from disaster you will need a lot more than the DDLs of dbc, but anyways you can do the dictionary tables archival using the arcmain utility and restore it when required.

The below script will do the data dictionary archive of a database includes all table, view, macro and trigger definitions, and dictionary entries for stored procedures. You can limit the archival to certain tables as well.

LOGON USER,USER;
ARCHIVE DICTIONARY TABLES (DBC),
FILE = DBC_DA;
LOGOFF;

LOGON USER, USER;
RELEASE LOCK (DBC);
LOGOFF;
Teradata Employee

Re: Help me to get the backup of ONLY DBC tables DDL (Not data).

As suggested by Qaisar, in case of disaster you wil definitely require alot more than just DDLs.

Also, what kind of a disaster are we preventing here .... can we take some pre-emptive measures to avoid that disaster altogether?