Ever asked a PL/SQL code developer to create documentation for his code, the way Javadoc is able to create for Java code? It is possible using the open-source tool PLDoc. And now I hear: “PLDoc what is that?”.
PLDoc is an open-source utility for generating HTML documentation of code written in Oracle PL/SQL. This open source project has as goal to provide a tool analogous to JavaDoc and after testing it I was pleasantly surprised. The generated documentation looks great when the code is commented in the proper way, which is merely a thing of getting used to. The only drawback I noticed was the fact that you need to create file(s) for your packages. The good thing is that PLDoc is open-source so you can make a contribution to the project, which we did. We extended the functionality so it can directly create the documentation with the use of a database connection. Adding the optional parameters: -user -password -url – sql will allow PLDoc to create the documentation directly from the database using the SYS.DBMS_METADATA.GET_DDL package function. This function, available from Oracle RDBMS version 9 and above, can extract the ddl for most database entities. In this case we used it to extracte the ddl for package specifications. The -sql option accepts the standard Oracle wildcards and allows you to specify several packages separated by a comma. PLDoc can be downloaded from http://pldoc.sourceforge.net/ this version did, as we published this Blog, not yet contain the modifications we made. If you do not want to wait for the added functionality to be posted on the sourceforge site you can download our modified version here .
PLDoc makes documenting your PL/SQL code much easier.
Gert-Jan Paulissen and Marcos Claver