Creating a row-level Virtual Private Database (VPD)

Oracle provides the framework to provide custom row-level security. This needs to be defined and built using PL/SQL and some of the default Oracle packages.

Getting ready

In order to create the VPD functions, we will need to have a sample schema. This sample schema will be used throughout the recipes. Open SQL Developer and log in to the database using an administrator user (SYS, system, and others) and create a schema owner for the sample objects. Ensure you grant the following permissions to the schema owner; replace<Schema> with your schema owner name:

GRANT CONNECT, RESOURCE TO <Schema>; GRANT select_catalog_role TO <Schema>; -- Included to enable the use of autotrace GRANT SELECT ANY dictionary ...

Get Business Intelligence Cookbook: A Project Lifecycle Approach Using Oracle Technology now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.