Search code examples
oracle-databaseviewrolessql-grant

Provide read only access only to specific View in Oracle


I have 5 views in my Oracle database schema. And i need to provide read only access to only one view for user.

I am thinking below approach but not sure if its possible as i am not good in dba part.

a) Create a new user  or the corresponding business role APP_ROLE and assign "CREATE SESSION" rights.

b) GRANT SELECT ON <view> TO {APP | APP_ROLE}

Solution

  • In actual oracle versions (>=12.1.0.2) it's better to use read privilege:

    1. New features 12.1.0.2
    2. READ Object Privilege in Oracle Database 12c Release 1 (12.1.0.2)

    On previous versions - yes, grant select is fine.