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 > Can you load a valid DB2 DDL into DB2 to create tables/databases?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-22-07, 10:02
mr_coffee mr_coffee is offline
Registered User
 
Join Date: Aug 2007
Posts: 28
Talking Can you load a valid DB2 DDL into DB2 to create tables/databases?

Hello everyone.

I was wondering if this is possible, it seems like it should be valid but I can't find the option anywhere in the DB2 Devlopement Center or Warehouse Center.

I have a flat file that contains DB2 DDL SQL.

I want to load this file into some program to create the tables in DB2.

the file looks like this:
CREATE DISTINCT TYPE functionType_32767 AS VARCHAR(32767);
CREATE TABLE "MSM".
"bridgeLink"
(
"ActivateCommandText" CharVar_32767
,
"AggregationParent" ObjectLinkList
,
"AggregationPriorityValue" Integer
....
....


I can load this DB2 .DDL into a model tool, such as Rational Software Architect, and it will show all the tables so its valid DB2 DDL but now I want to actually create the database from this script and I'm confused on how I can do this.


Thanks any help would be great!
__________________
IBM: Tivoli zSeries Co-op
Reply With Quote
  #2 (permalink)  
Old 10-22-07, 10:20
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Code:
db2 -tf <filename>
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 10-22-07, 10:21
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Open Control Center.

Tools>>>Command Editor.
__________________
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
  #4 (permalink)  
Old 10-22-07, 11:11
mr_coffee mr_coffee is offline
Registered User
 
Join Date: Aug 2007
Posts: 28
Thanks that worked great!
__________________
IBM: Tivoli zSeries Co-op
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