Creating database analysis policy
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.
Getting ready
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.
How to do it...
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; /
How it works...
In step 2, you created database-wide policy...