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 I generate an sql database script?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-16-04, 12:40
AStefan AStefan is offline
Registered User
 
Join Date: Jun 2004
Posts: 57
Can I generate an sql database script?

Let's say I have a DB2 database full of objects (tables, constraints, views, stored procedures and triggers) all belonging to the same custom schema.
I would like to know if it is possible to generate a sql script with all these objects.
In SQl Server exists an options named "generate sql script". WIth this options it is possible to generate a script by which I can create the database everywhere I want (I mean the objects structure not the data of course). Is it possible to do this in DB2?
The script may look like this one:

Create table T1 ...
Create table T2 ...
Create table T3 ...
...
Create index I1
Create index I2
etc
Alter table T1 add constraint FK ...

Create trigger tg1

etc.

Thanks in advanced.
Reply With Quote
  #2 (permalink)  
Old 08-16-04, 13:08
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
See if the db2look utility will help you. Its detailed description is in the Command Reference
Reply With Quote
  #3 (permalink)  
Old 08-18-04, 13:12
Falcon_down Falcon_down is offline
Registered User
 
Join Date: Aug 2004
Location: India
Posts: 13
Hi there

I think db2look utility will help you out

But you may not be able to generate dll for Stored Procedures from db2look utility



Regards
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