Oracle Security OLS Vs VPD
OLS Oracle Label security allows row level
security based on user credentials
VPD virtual private database allows similarly
row level access control but OLS adds
additional column to table.
VPD does filtering adding Where prefix to
Every Query based on user.
Use Case VPD/OLS
• Web based systems or any application needs
to allow user based access to contents.
Usually this logic is coded at application layer
or in Language at web server level.
• But now by using VPD/OLS user based access
to web content can be maintained at database
level providing better security to applications.
And Easing up application logic.
• Useful for Content management, ERP access
to user based functionality, Behavioural
Business Intelligence, User based web sites.
When To use VPD or OLS?
• VPD is used when you have clear visibility
from the data on which you want to apply
filter based on user. If there is not clarity then
OLS is helpful.
• VPD Example: Salesman viewing marketing
data of his region Now Region + user_id is
picked from Role and Access to only those
rows are provided.