title: Is there a tool to generate a full database DDL for SQL Server? What about Postgres and MySQL?
body: <p>Using Toad for Oracle, I can generate full DDL files describing all tables, views, source code (procedures, functions, packages), sequences, and grants of an Oracle schema.  A great feature is that it separates each DDL declaration into different files (a file for each object, be it a table, a procedure, a view, etc.) so I can write code and see the structure of the database without a DB connection.  The other benefit of working with DDL files is that I don't have to connect to the database to generate a DDL each time I need to review table definitions.  In Toad for Oracle, the way to do this is to go to Database -> Export and select the appropriate menu item depending on what you want to export.  It gives you a nice picture of the database at that point in time.</p>
  
  <p>Is there a "batch" tool that exports<br>
  - all table DDLs (including indexes, check/referential constraints)<br>
  - all source code (separate files for each procedure, function)<br>
  - all views<br>
  - all sequences<br>
  from SQL Server?  </p>
  
  <p>What about PostgreSQL?<br>
  What about MySQL?<br>
  What about Ingres?  </p>
  
  <p>I have no preference as to whether the tool is Open Source or Commercial.</p>