Reputation: 879
Is there a way to mandate table/column comments in Oracle 11g.
Some Database parameters or something of that sort.
Upvotes: 2
Views: 229
Reputation: 231661
Probably not, no.
Presumably, when you're creating objects, you do so by giving the DBA a script to run in each environment. Just as the DBA would do things like examine the naming conventions of the tables and columns that you create, the DBA should be enforcing whatever other standards you have such as requiring comments on objects.
You could run a report of objects and/or columns that don't have comments and instruct the developers to correct the problems.
If you really want a technical solution, you may be able to hack something together. For example, you could create a DDL trigger that fired when a new object was created. The trigger could use the DBMS_JOB
package to create a job that will run a few minutes later and check whether comments have been added. Assuming that comments were missing, you could take whatever action you deem appropriate-- that could include dropping the object if you really wanted to. I would strongly suggest a process solution instead but you could build a technical solution.
Upvotes: 8