• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2225
  • Last Modified:

Create DDL file in AS400 DB2 for Reverse Engineering


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??


2 Solutions
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.
Dave FordSoftware Developer / Database AdministratorCommented:
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.


sun4sundayAuthor Commented:
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

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Tackle projects and never again get stuck behind a technical roadblock.
Join Now