I usually end up re-creating this script, or something like it, on every job to help get my head around the database schema. This is an amalgamation of several variations.
DumpSqlServerDbSchema /c connection-string [/t] [/i title] [/rp regexp | /rf file-name ] connection-string: ADO connection string to connect to database (required) /t: include table of contents (optional) /t: set the title of the HTML page (optional) regexp: regular expression that matches the names of tables containing reference data (optional) file-name: file name containing a list of names of tables containing reference data (optional)
Bugs/ Missing Features
- Extend to include other database objects (stored procedures, etc.)