Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 02 Feb 2007 @ 14:30:32 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


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



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023