Generate DDL of Schema

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fahimghauri
    New Member
    • Mar 2008
    • 8

    Generate DDL of Schema

    Hi,

    How can DDL of a schema be generated in oracle, as in DB2 db2look command provide the facility?
    I can generate DDL from enterprise manager, but that create generate DDL of a single table and also does not generate DDL of Foreign keys.

    Regards,
    Fahim
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    you can export the schema and recreate the entire schema from the dump using import.

    Comment

    • fahimghauri
      New Member
      • Mar 2008
      • 8

      #3
      Originally posted by debasisdas
      you can export the schema and recreate the entire schema from the dump using import.
      thanks Debasisdas,

      But this is not desired. I need only SQL commands (DDL) as a text file,if its possible.

      As I said, It is possible to create DDL of a single table, if it is possible for a single table then it must be possible to generate for all tables, I guess through some API or database procedures. But I am unable to find until now. . .

      Regards,
      Fahim

      Comment

      • amitpatel66
        Recognized Expert Top Contributor
        • Mar 2007
        • 2358

        #4
        Check out for DBMS_METADATA package for getting the DDL of the tables

        Comment

        Working...