All Forums Database
DeepakDhabade 18 posts Joined 02/14
01 Apr 2014
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

Raja_KT 1246 posts Joined 07/09
02 Apr 2014

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.

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

Qaisar Kiani 337 posts Joined 11/05
02 Apr 2014

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;

 

Adeel Chaudhry 773 posts Joined 04/08
08 Apr 2014

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?

-- If you are stuck at something .... consider it an opportunity to think anew.

You must sign in to leave a comment.