Creating context analysis policy
In this recipe, you'll create a context analysis policy. After the policy is enabled, it will capture privileges when the condition specified in the policy evaluates to true
.
Getting ready
You'll need an existing user who can create a privilege analysis policy (has the CAPTURE_ADMIN
role and the SELECT ANY DICTIONARY
privilege), for example, the SYSTEM
user.
How to do it...
Connect to the database as system or a user who has appropriate privileges:
$ sqlplus system
Create a privilege analysis policy that captures all the used (and unused) privileges by
Steve
:SQL> BEGIN SYS.DBMS_PRIVILEGE_CAPTURE.CREATE_CAPTURE( name => '<policy_name>', description => '<your_desc>', type => DBMS_PRIVILEGE_CAPTURE.G_CONTEXT, condition => '<your_condition>'); END; /
There's more...
Another way to create a context privilege analysis policy is to use EM12c. Repeat steps 1, 2, and 3 from the...