/* BEGIN SQLPLUS */
/* Run this script as sysdba. */
/* If the "mdsys" schema is locked, unlock with:        */
/*     alter user mdsys account unlock;                 */
/* before running this script, then re-lock it with:    */
/*     alter user mdsys account lock;                   */
/*														*/
/*	Change:1405	danube	03Nov28		Barbara Zoladel		*/
/*		Added sys privileges to f_user_role and			*/
/*		f_schema_role.									*/
/*
/*  	SPR:618492	enterprise 04Dec15	Barbara Zoladek		*/
/*		Added ANALYZE ANY to f_user_role.				*/
/*														*/
/*				   05Dec13	Barbara Zoladek	  	*/
/*	Removed f_schema_role.						*/

rem Do not show errors if roles don't exist
set termout off
set feedback off

drop role f_user_role;

rem turn on output
set termout on
set feedback on
whenever sqlerror exit failure

create role f_user_role;

grant  CREATE USER, DROP USER, ALTER USER, CREATE SESSION, ALTER SESSION, ANALYZE ANY, CREATE ANY TABLE , DROP ANY TABLE, ALTER ANY TABLE, DELETE ANY TABLE, SELECT ANY TABLE, INSERT ANY TABLE, UPDATE ANY TABLE, LOCK ANY TABLE, CREATE ANY INDEX, DROP ANY INDEX, ALTER ANY INDEX, CREATE ANY VIEW, DROP ANY VIEW, CREATE ANY SEQUENCE,  DROP ANY SEQUENCE, ALTER ANY SEQUENCE, SELECT ANY SEQUENCE, CREATE ANY SYNONYM, DROP ANY SYNONYM, CREATE ANY PROCEDURE, GRANT ANY ROLE, GRANT ANY PRIVILEGE,  GLOBAL QUERY REWRITE, WM_ADMIN_ROLE, grant any object privilege to f_user_role;
grant select on sys.v_$session to f_user_role;
grant select on sys.dba_role_privs to f_user_role;
grant select on sys.dba_roles to f_user_role;


commit;
