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 > database creation

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-01-10, 23:24
lazydev lazydev is offline
Registered User
 
Join Date: Mar 2010
Posts: 15
database creation

I want to generate an database creation script from the existing database.
Do we have any command for this to do in db2 ?

DB2Look doesnot generate the database creation syntax .
Reply With Quote
  #2 (permalink)  
Old 08-02-10, 02:21
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
There is no simple way to do it. However you could find all the necessary information in various places:

The code set, territory code, log path, database page size, etc are in the db cfg (db2 get db cfg).

The db path is in the db2 node directory (db2 list db directory).

The information about tablespaces (syscatspace, tempspace1, and userspace1) are in "db2 list tablespaces" and or 'db2 list tablespace containers for x".

If you have 9.7 you can get most or all of the information in the DB2 administrative views (not sure about 9.5).
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 08-03-10, 16:04
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
and for user-defined tablespaces and bufferpools you can use db2look with l option:

db2look -d db_name -l
__________________
DB2 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
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