Hi,
I need to create a Schema like APPS Schema in Oracle Application R12 but read only.
Thanks,
Mina
Sign Up to our social questions and Answers to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers to ask questions, answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Hello Mina,
you can follow the below Steps:
Method :1
[code]
SQL> CREATE USER APPSREAD IDENTIFIED BY APPSREAD;
User created.
SQL> GRANT CONNECT, RESOURCE,CREATE SYNONYM TO APPSREAD;
Grant succeeded.
[/code]
Generate a Script for creating database objects of Application User ‘APPS’.
[code]
set echo off set
pagesize 0
set linesize 300
spool cr8synonyms.sql
select ‘create synonym ‘ || OBJECT_NAME || ‘ for ‘|| OWNER ||’.’ ||OBJECT_NAME || ‘;’ from all_objects where OWNER in (‘APPS’) and
OBJECT_NAME not like ‘%/%’ and OBJECT_TYPE in (‘TABLE’,’VIEW’,’SYNONYM’);
spool off
[/code]
Generate a script for selecting database objects of Application User ‘APPS’.
[code]
spool GrantSelect.sql
select ‘grant select on ‘|| OWNER ||’.’ ||OBJECT_NAME || ‘ to APPSREAD;’ from all_objects where OWNER not in (‘SYS’,’SYSTEM’) and OBJECT_NAME not like ‘%/%’ and OBJECT_TYPE in (‘TABLE’,’VIEW’,’SYNONYM’);
spool off
[/code]
Connect to sqlplus as sysdaba and execute the following script
[code]
SQL> @GrantSelect.sql
SQL> @cr8synonyms.sql
[/code]
Connect to Read only schema User and check the objects.
[code]
SQL> conn APPSREAD/APPSREAD Connected.
SQL> select count(*) from tab;
COUNT(*) ———- 15515
[/code]
Regards.