Search code examples
sql-serverdocumentationdocumentation-generation

Extract documentation strings from SQL Scripts


How can I best extract the documentation strings from T/SQL scripts and present them as a user-frienfly API documentation? I know about tools like Doxygen, Javadocs or Sphinx, but none of them seem to know about SQL.

For example, I want to be able to make use of the documentation in scripts that contain create statements like follows:

/**
 * This is a stored procedure.
 *
 * @param foo foo does bar
 */
create procedure my_proc(foo varchar(100)
...
GO

Solution

  • The SQL Refactor tool together with the SQL Prompt tool from Red gate Might have what you are looking for. link I have used it a long time ago to document my own Stored Procs