1. Create user:
create user APPSREADONLY identified by APPSREADONLY123 default tablespace APPS_TS_TX_DATA;
2. Create Role:
Create role readrole;
Grant create session to readrole;
Grant connect to readrole;
Grant select any table to readrole;
Grant execute any procedure to readrole;
Grant create trigger to readrole;
3. Grant role to user:
Grant readrole to APPSREADONLY;
--------------------------------------
If User need to have an existing user privelegemeans run below query
Eg.
I am creating now APPSREADONLY user and this user having all the priveleges of APPS user.
4. Create trigger:
Login as APPSREADONLY and create the following trigger:
Create or replace trigger rlogin_trigger
After logon on APPSREADONLY.schema
declare
Begin
EXECUTE IMMEDIATE
'declare begin ' ||
'dbms_application_info.set_client_info ( 101 ); end;';
EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA =APPS';
END;
/
create user APPSREADONLY identified by APPSREADONLY123 default tablespace APPS_TS_TX_DATA;
2. Create Role:
Create role readrole;
Grant create session to readrole;
Grant connect to readrole;
Grant select any table to readrole;
Grant execute any procedure to readrole;
Grant create trigger to readrole;
3. Grant role to user:
Grant readrole to APPSREADONLY;
--------------------------------------
If User need to have an existing user privelegemeans run below query
Eg.
I am creating now APPSREADONLY user and this user having all the priveleges of APPS user.
4. Create trigger:
Login as APPSREADONLY and create the following trigger:
Create or replace trigger rlogin_trigger
After logon on APPSREADONLY.schema
declare
Begin
EXECUTE IMMEDIATE
'declare begin ' ||
'dbms_application_info.set_client_info ( 101 ); end;';
EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA =APPS';
END;
/
No comments:
Post a Comment