April 27, 2005 at 7:08 am
Helo all -
I would like to query for a given database's schema and return the results including tables & fields (name, type, length, description primarily) for documentation purposes. Indexes, keys, and relationships would be nice as well. I understand this data lives in the Master Database. I am hoping someone has a query (that I will save to a View) that will return what I need, as I'm just a lazy manager not a DBA
TIA
Rod
April 27, 2005 at 8:01 am
Sounds like you want to generate SQL scripts, which is inbuilt in SQL Server.
In Enterprise Manager, right click on the DB, expand all tasks and select Generate SQL Scripts.
There's more details of how to use it in BOL.
April 27, 2005 at 8:12 am
You may also want to try something like :
http://www.sqlservercentral.com/scripts/contributions/1005.asp
or look into a product like Apex SQL Doc. (http://www.apexsql.com)
Francis
April 28, 2005 at 5:25 am
SchemaToDoc (http://www.schematodoc.com) will export a database's meta information to a Word document. For each table it documents: primary keys, field info (datatype, size, defaults, nullable), indexes, check constraints, foreign key constraints, triggers, and extended properties (for tables and fields). A special version of the program also lets you annotate your tables and fields and include those comments in the Word doc.
April 28, 2005 at 6:45 am
Fabulous tips guys, thanks. I'll try the script before I buy the tool.
Thanx,
Rod
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply