ScriptDB will generate scripts for all objects and (optionally) data in any SQL 2000/2005 database. It is a console application written in C#. The source code is freely available so you can modify it to meet your needs if you know a little C#.
Given one or more connection strings to SQL Server, Oracle, DB2, MySQL, PostgreSQL, Analysis Server, or Access databases, SqlSpec will generate documentation about all the objects in your database.