--
-- Role to which object permissions to ODS user are granted
--
CREATE ROLE MRDS_LOADER_ROLE;
GRANT MRDS_LOADER_ROLE TO ODS;
GRANT MRDS_LOADER_ROLE TO MRDS_LOADER;

GRANT READ, WRITE ON DIRECTORY DATA_PUMP_DIR TO MRDS_LOADER_ROLE;
GRANT EXECUTE ON DBMS_CLOUD TO MRDS_LOADER_ROLE;
EXEC DBMS_CLOUD_ADMIN.ENABLE_RESOURCE_PRINCIPAL(username => 'MRDS_LOADER');
GRANT EXECUTE ON CT_MRDS.FILE_MANAGER TO MRDS_LOADER_ROLE;
GRANT SELECT, DELETE, INSERT, UPDATE ON  "CT_MRDS"."A_SOURCE_FILE_CONFIG" TO MRDS_LOADER_ROLE;
GRANT SELECT, DELETE, INSERT, UPDATE ON  "CT_MRDS"."A_SOURCE_FILES_RECEIVED" TO MRDS_LOADER_ROLE;
GRANT SELECT ON "CT_MRDS"."A_SOURCE_FILES_RECEIVED_KEY_SEQ" TO MRDS_LOADER_ROLE;
GRANT SELECT_CATALOG_ROLE TO MRDS_LOADER_ROLE;

