Command rules can be used in Oracle Vault to restrict and protect database objects against DDL and DML statements, by imposing specific rules. Usually command rules are associated with rulesets, a subject covered in the next recipe. This association is made to permit or restrict certain statements following a logical rule at runtime.
In this recipe, we will create a command rule that will control attempts to select the EMP_DETAILS_VIEW
by using the PL/SQL interface and a command rule that controls the use of the CREATE VIEW
statement by using DVA. We will be using these two command rules again, in the Creating and using Oracle Vault rulesets recipe given later.