CREATE USER SWINGTIC
  IDENTIFIED BY VALUES 'F4010CD995987CBB'
  DEFAULT TABLESPACE SWING
  TEMPORARY TABLESPACE TEMP
  PROFILE DEFAULT
  ACCOUNT UNLOCK;
  -- 1 Role for SWINGTIC 
  GRANT CONNECT TO SWINGTIC;
  ALTER USER SWINGTIC DEFAULT ROLE ALL;
  -- 19 System Privileges for SWINGTIC 
  GRANT CREATE VIEW TO SWINGTIC;
  GRANT CREATE TABLE TO SWINGTIC;
  GRANT DROP ANY VIEW TO SWINGTIC WITH ADMIN OPTION;
  GRANT CREATE SESSION TO SWINGTIC;
  GRANT CREATE SYNONYM TO SWINGTIC;
  GRANT DROP ANY INDEX TO SWINGTIC;
  GRANT DROP ANY TABLE TO SWINGTIC WITH ADMIN OPTION;
  GRANT ALTER ANY TABLE TO SWINGTIC;
  GRANT CREATE ANY VIEW TO SWINGTIC;
  GRANT CREATE ANY INDEX TO SWINGTIC;
  GRANT CREATE ANY TABLE TO SWINGTIC;
  GRANT CREATE PROCEDURE TO SWINGTIC;
  GRANT DELETE ANY TABLE TO SWINGTIC;
  GRANT INSERT ANY TABLE TO SWINGTIC;
  GRANT SELECT ANY TABLE TO SWINGTIC WITH ADMIN OPTION;
  GRANT UPDATE ANY TABLE TO SWINGTIC;
  GRANT CREATE ANY PROCEDURE TO SWINGTIC;
  GRANT EXECUTE ANY PROCEDURE TO SWINGTIC WITH ADMIN OPTION;
  GRANT CREATE PUBLIC DATABASE LINK TO SWINGTIC;
  -- 1 Tablespace Quota for SWINGTIC 
  ALTER USER SWINGTIC QUOTA UNLIMITED ON SWING;
  -- 6 Object Privileges for SWINGTIC 
    GRANT EXECUTE ON  SYS.DBMS_AQ TO SWINGTIC WITH GRANT OPTION;
    GRANT EXECUTE ON  SYS.DBMS_AQADM TO SWINGTIC WITH GRANT OPTION;
    GRANT EXECUTE ON  SYS.DBMS_AQELM TO SWINGTIC WITH GRANT OPTION;
    GRANT EXECUTE ON  SYS.DBMS_AQ_IMPORT_INTERNAL TO SWINGTIC WITH GRANT OPTION;
    GRANT EXECUTE ON  SYS.DBMS_RULE_EXIMP TO SWINGTIC WITH GRANT OPTION;
    GRANT EXECUTE ON  SYS.DBMS_TRANSFORM_EXIMP TO SWINGTIC WITH GRANT OPTION;
  -- 1 Resoure Group Privilege for SWINGTIC 
BEGIN
  SYS.DBMS_RESOURCE_MANAGER.clear_pending_area();
  SYS.DBMS_RESOURCE_MANAGER.create_pending_area();
  SYS.DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP
    ('SWINGTIC','SYS_GROUP',TRUE);
  SYS.DBMS_RESOURCE_MANAGER.submit_pending_area();
END;
/


