Archives of the TeradataForum
Message Posted: Fri, 02 Feb 2007 @ 14:30:32 GMT
Subj: | | Re: How to dump all object definitions in a database |
|
From: | | Mohommod.Khan |
One quick and easy way is to write an stored procedure. You can capture your sql out result and then later on insert it to a table. Show
table probably should do the trick. I am probably thinking too loud but here the steps that you can follow:
1. Feed the databasename and get the table name using some thing like this:
select tablename from dbc.Tables where DatabaseName ='test'
and TableKind ='T';
2. Do show table <tableName> as follows finished a loop, from the above result tset:
DO
SET STR1 = 'Show Table '
|| MyVAR.TableName
|| ';' ;
CALL DBC.SYSEXECSQL(:STR1);
END FOR ;
HtH
|