In this recipe, you'll learn to create database privilege analysis policy. It analyzes privileges in the whole database (except privileges used by SYS
user). You can use SQL*Plus and Enterprise Manager Cloud Control 12.1.0.3+ (in our case, EM12cR4) to create privilege analysis policies.
You'll need an existing user who can create a privilege analysis policy (has CAPTURE_ADMIN
role and SELECT ANY DICTIONARY
privilege), for example, SYSTEM
user.
Connect to the database as system or a user who has appropriate privilege:
$ sqlplus system
Create a privilege analysis policy that captures all the used privileges in the database:
SQL> BEGIN SYS.DBMS_PRIVILEGE_CAPTURE.CREATE_CAPTURE( name => '<policy_name>', description => '<your_desc>', type => DBMS_PRIVILEGE_CAPTURE.G_DATABASE); END; /