DROP USER surveys_mv_so CASCADE;

CREATE USER surveys_mv_so
  IDENTIFIED BY "TvHj4523!hU8!gh"
  DEFAULT TABLESPACE survey_tbspc
  TEMPORARY TABLESPACE temp
  PROFILE DEFAULT
  ACCOUNT UNLOCK;

GRANT CREATE MATERIALIZED VIEW TO surveys_mv_so;
GRANT CREATE SESSION TO surveys_mv_so;
GRANT CREATE TABLE TO surveys_mv_so;
GRANT UNLIMITED TABLESPACE TO surveys_mv_so;

GRANT SELECT, QUERY REWRITE ON SURVEY.FACILITY TO SURVEYS_MV_SO;
GRANT SELECT, QUERY REWRITE ON SURVEY.SURVEY TO SURVEYS_MV_SO;
GRANT SELECT, QUERY REWRITE ON SURVEY.SURVEY_RESPONSE TO SURVEYS_MV_SO;
GRANT SELECT, QUERY REWRITE ON SURVEY.VENDOR TO SURVEYS_MV_SO;

