You are on page 1of 2

In 11i and r12 (DEV/TEST)

SQL> alter user HPFESTIN identified by "2019hpfestin";

User altered.

SQL> GRANT ALL PRIVILEGES to HPFESTIN ;

Grant succeeded.

SQL> Grant DBA to HPFESTIN;

Grant succeeded.

SQL> grant Connect to HPFESTIN;

Grant succeeded.

SQL> Grant resource to HPFESTIN;

Grant succeeded.

In PROD 9 11i/R12

SQL> alter user jlrabuan identified by "2019jlrabuan";

User altered.

SQL> GRANT CREATE SESSION to jlrabuan;

Grant succeeded.

SQL> CREATE ROLE Select_Role;

Role created.

SQL> BEGIN
FOR x IN (SELECT * FROM dba_tables WHERE owner='APPS')
LOOP
EXECUTE IMMEDIATE 'GRANT SELECT ON APPS.' || x.table_name ||
' TO Select_Role';
END LOOP;
END; 2 3 4 5 6 7
8 /

PL/SQL procedure successfully completed.

SQL> GRANT Select_Role to jlrabuan;

Grant succeeded.

SQL> grant Connect to jlrabuan;

Grant succeeded.

SQL> Grant resource to jlrabuan;

Grant succeeded.
SQL>

BEGIN
FOR x IN (SELECT * FROM dba_tables WHERE owner='APPS')
LOOP
EXECUTE IMMEDIATE 'GRANT SELECT ON apps.' || x.table_name ||
' TO Select_Role';
END LOOP;
END;

You might also like