Create DDL file in AS400 DB2 for Reverse Engineering

Posted on 2005-04-27
Last Modified: 2011-09-20

I want to Rreverse Engineering the AS400 DB2 Database.
One expert told that it can done through Erwin if you have the DDL Script.

Q: How can I generate the entire DDL script of the database in AS400 DB2 and how can I save it in different format (like doc,txt etc)

IS there any other solution for Reverse engineering the AS400 DB2 database with some free tools??


Question by:sun4sunday
    LVL 1

    Accepted Solution

    Using ER-Win you can connect to different databases like Oracle, SQL, Access, DB2 etc.

    You can reverse engineer a database model either directly from the database or from a script file.

    From ERWIN 3.5.2
    You do Tasks -> Reverse Engineer
    and it gives you an option of selecting the target database.

    Then you are asked to select the database objects to reverse engineer.

    Once you have reverse engineered, you can save the DDL in a text file.

    I do not know of any free tools that can do this.
    LVL 18

    Assisted Solution

    As the previous post states, ERWin would work well for your reverse engineering.

    You don't need the DDL to accomplish it.  You just point ERWin at the correctly-defined ODBC data-source, and it sucks it all into a data-model.

    Alternately, (and much cheaper if you don't already own ERWin), you can generate the DDL via Operations Navigator (which is called iSeries Navigator in more recent versions). I believe it's free with the operating system.

    You simply expand "Database", then "Libraries", then locate your specific library and table. Right click on the table and choose "Generate SQL". From there, just follow the prompts.

    If you only have a few tables to do, this option should work for you. Of course, if you have LOTS of tables to do, then this method can be too time-consuming.


    LVL 9

    Author Comment

    hI..sorry fro the delay.

    You just point ERWin at the correctly-defined ODBC data-source, and it sucks it all into a data-model.

    I have ERWIN 2.5 and when I select the Menu> Server DB Schema Generation...>
    when I press Generate I am getting an Error

    Establishing connection to DB2
    Unable to load ODBC.DLL(2)
    Check that ODBC.DLL is in your path or working directory

    How  can I get rid off this error

    Kinldy explain the procedure step by step..I came accross to generate the database schema  from the database and I am not an expert in DB2 and Erwin



    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Introduction: I have seen many questions on EE and elsewhere, asking about how to find either gaps in lists of numbers (id field, usually) ranges of values or dates overlapping date ranges combined date ranges I thought it would be a good …
    SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now