Showing posts with label Create read only role and schema. Show all posts
Showing posts with label Create read only role and schema. Show all posts

Saturday, 7 June 2014

Create read only user access for non FCUBS

Create read only user access for non FCUBS


In Production database if application user want trouble shoot the issue in back end.
As per policy you cannot give application schema credentials,So you can create user for grant select privileges as below.

1. create role READONLY_ROLE not identified;

2. begin
for t1 in ( select owner,table_name from dba_tables where owner='<FCUBS_SCHEMA>') loop
execute immediate ' grant select on ' || t1.owner || '.' || t1.table_name || ' to READONLY_ROLE';
end loop;
end;