Peoplesoft XML Publisher Guide

Thursday, 7 November 2013

Oracle Database Read Only User


This post explains how to create a user with read only access for any table in an Oracle Schema.

This Schema "SYSTEM" hold 50 tables and we create a user to access only this 50 tables in read only mode.

Let's take the database name as Test1

> SET ORACLE_SID=Test1
> SQLPLUS /NOLOG

SQL> CONN SYSTEM/SYSTEM;
SQL> CREATE USER User_Read_Only indentified by User_Read_Only
SQL> GRANT CREATE SESSION, SELECT ANY TABLE TO User_Read_Only
SQL> Commit;
Now connect as newly created Read Only User and test.

SQL> CONN User_Read_Only/User_Read_Only;

Check for tables using this new User and SYSTEM.

Done

No comments:

Post a Comment