Total Pageviews

Tuesday, 10 March 2015

Creating APPS READ ONLY schema in Oracle Applications

Creating APPS READ ONLY schema in Oracle Applications
=====================================================
bash $ sqlplus "/ as sysdba"

SQL > create user appsro identified by appsro default tablespace APPS_TS_TX_DATA;

SQL> grant connect, resource to appsro;

SQL> grant create synonym to appsro;

SQL> exit;
bash $ sqlplus apps/******

SQL>set head off

SQL> set newpage none

SQL> set pagesize 9999

SQL> spool create_synonyms.sql

SQL> select 'create synonym ' || OBJECT_NAME || ' for ' || OWNER ||'.' ||OBJECT_NAME || ';' from all_objects where OWNER not in ('SYS','SYSTEM') and OBJECT_NAME not like '%/%' and OBJECT_TYPE in ('TABLE','VIEW','SYNONYM');

SQL> spool off

SQL> spool grant_select.sql

SQL> select 'grant select on '|| OWNER ||'.' ||OBJECT_NAME || ' to appsro;' from all_objects where OWNER not in ('SYS','SYSTEM') and OBJECT_NAME not like '%/%' and OBJECT_TYPE in ('TABLE','VIEW','SYNONYM');

SQL> spool off

SQL> exit;

bash $ sqlplus "/as sysdba"

SQL> @grant_select.sql

SQL> exit;

bash $ sqlplus appsro/appsro

SQL> @create_synonyms.sql

SQL> exit;



Ref:
===
https://muneer2908.wordpress.com/tag/apps-read-only-schema-apps_read_only-appsro-database-objects-owned-by-apps-user-applications-oracle-apps-11i-r12-9i-10g/

No comments :

Post a Comment