Configure Read Only User for OAM Purpose

———————————————————————————————————————
–Purpose of below senario is to create read only user should provide access to oam team
–We will create the synonym as RPT+_TABLE_NAME =~  RPT_{TABLE_NAME}
———————————————————————————————————————
–$
–Note:Connect to the sys user
–$sqlplus sys/******** as sysdba
–Step-1 Check the Datafile Location

SQL> SELECT NAME FROM V$DATAFILE;

–Step-2–Create the tablespace for read only user

SQL> CREATE TABLESPACE APP_RO 
ADD DATAFILE 'datafile_location' size 100m;

–Step-3–Create the username for read only user

SQL> CREATE USER APP_RO IDENTIFIED BY APP_RO DEFAULT TABLESPACE APP_RO;

–Step-4–Grant the read only user

SQL> GRANT CONNECT,RESOURCE,SELECT ANY TABLE TO APP_RO;

—Note–SELECT ANY TABLE :- Allows a user to select from any table, view or materialized view in the database.

–Step-5–connect to live HR user

SQL> connect APP_RO/-----------

--Step-6--List and Select Tables as Read Only
SQL> SELECT COUNT(1) FROM HR.TBLCUSTOMER;

SQL> SELECT COUNT(1) FROM HR.TBLSESSIONS;

SQL>exit;

–$

2 thoughts on “Configure Read Only User for OAM Purpose

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.