Example: How to Move a RLS Policy Between Databases Using Datapump

(Doc ID 1637312.1)

Last updated on JUNE 23, 2014

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 11.2 to 12.1]
Information in this document applies to any platform.


The objective is to move the RLS policy between databases with data pump export and import.

This may be best illustrated with an example, where an RLS policy is created in the source database (SOURCEDB), exported with data pump export utility (expdp) and finally imported into the target database (TARGETDB) with the data pump import utility (impdp).

The policy will restrict access to records in the SCOTT.EMP table to rows WHERE ENAME = 'SMITH'. This of course is not a very good policy as it will restrict access to everyone, including SCOTT. But the purpose of this document is to illustrate how to export a policy, not how to write a good policy.


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms