If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > how to export schema information of a db

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-16-06, 08:18
nongentesimus nongentesimus is offline
Registered User
 
Join Date: Nov 2006
Posts: 1
how to export schema information of a db

Hello,

Could you help me, if there is any easy way to get all schema information of a database (without geting data itself). We have a db2 database, but we do not have the scripts that created that database. Now we should make a copy of that db on an other machine (copy of the schema, not the data).

Thanks for Your help,
Peter
Reply With Quote
  #2 (permalink)  
Old 11-16-06, 11:48
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
schema

db2look -d dbname -e -l -x -o outname
this wll generate all ddl
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
Reply With Quote
  #3 (permalink)  
Old 11-16-06, 14:15
preetim preetim is offline
Registered User
 
Join Date: Jun 2003
Posts: 77
You can also do this by going to the db2 control center. Navigate to the database name, right click and select -"Generate DDL" option.
Then you can use the generated script to create a fresh schema.
Hope this helps.

-Preeti

Last edited by preetim; 11-16-06 at 14:19.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On