If you are using Oracle 9i, then it is easy. You can use DBMS_METADATA package.

Example is shown here:
http://www.dbaclick.com/cgi-bin/ib3/...t=ST;f=17;t=11


For more cool ideas check the latest Oracle DBA forums:
http://www.dbaclick.com/cgi-bin/ib3/ikonboard.cgi

Hope that helps,



--clio_usa
Senior Oracle DBA