Creating Documentation

  • Hi,

    Does anyone know of a free and easy way to create documnetation for my sql database (that is, list all tables/views/sp etc. in a nice way, enabling me just to add remarks where I think they're necessary)?

     

    Thanks!

  • If you just want to list the db objects maybe you could just create a table with objecttype, objectName & objectRemarks (or some such) and select into this table using sysobjects...

    select xtype, name

    from sysobjects where xtype in ('tr', 'u', 'v', 'p')

    and name not like 'dt%'

    order by xtype, name

    Once you have the list you can add your remarks to the ojbects that you want..hopefully this is what you were asking...?!?!?!







    **ASCII stupid question, get a stupid ANSI !!!**

  • Well, I was thinking about a more detailed doc:

    For tables, views: also list the columns and keys

    For sp and functions: also list the parameters and return type

    etc...

     

  • eyal...I haven't looked into this in detail but this script shows some promise..check it out and see if it gets you started in the right direction...

    script







    **ASCII stupid question, get a stupid ANSI !!!**

  • Hey,

    The script doesn't work  - the Query Analyzer says "invalid column name 'name'" and the same for 'id'. I suspected it has to do with the fact that the temp table that is used in the proc has these reserved words as column names so i added quotes, but it didn't work either.

    Thanks a lot anyway!

     

  • I have a script that creates a stored proceedure for documenting tables and columns.  It uses the extended properties for the table and columns as descriptions.  I then take the output and store it in a text file when I am done.  Let me know if you are interested.

    Steve

  • Eyal,

    Check out this page, it might possibly help you out.

    http://www.codeproject.com/cs/database/sqldoc.asp

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply