Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    57

    Unanswered: 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.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    See if the db2look utility will help you. Its detailed description is in the Command Reference

  3. #3
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •