Thursday, November 9, 2017

Virtual Private Database (VPD) Demo.

Security is very important in today technology world. for example in the company, the CEO doesn't want the employees working in the Department 20 see the salary of the employees working in Department 10. especially End Of Year..hehe..you know that. So in this demo I will show you how to implement the Virtual Private Database(VPD) in Oracle Database. using this method we can restrict the condition and archive this goal. I will create a policy to let the employees to see only his/her own Department Data(Deptno 20).


1. Before apply the policy











2. Creating the policy function.




3. Creating the security policy. (on user sys)





















4. Verifying the policy






















We can see that user can see only data of Department num 20.


5. To drop the policy


EXECUTE dbms_rls.drop_policy('HR','EMPLOYEES','EMP_DEPT_20');