-- Run Script as SYSTEM

DROP VIEW ppsnepl.fdb_gcnseqno_pem_v;
DROP VIEW ppsnepl.fdb_gcnseqno_plblw_v;
DROP VIEW ppsnepl.fdb_monograph_pem_v;
DROP VIEW ppsnepl.fdb_plblwarnings_v;

GRANT SELECT ON fdb_dif.fdb_gcnseqno_pem TO ppsnepl WITH GRANT OPTION;
GRANT SELECT ON fdb_dif.fdb_gcnseqno_plblw TO ppsnepl WITH GRANT OPTION;
GRANT SELECT ON fdb_dif.fdb_monograph_pem TO ppsnepl WITH GRANT OPTION;
GRANT SELECT ON fdb_dif.fdb_plblwarnings TO ppsnepl WITH GRANT OPTION;

CREATE VIEW ppsnepl.fdb_gcnseqno_pem_v
AS
   SELECT * FROM fdb_dif.fdb_gcnseqno_pem;

CREATE VIEW ppsnepl.fdb_gcnseqno_plblw_v
AS
   SELECT * FROM fdb_dif.fdb_gcnseqno_plblw;

CREATE VIEW ppsnepl.fdb_monograph_pem_v
AS
   SELECT * FROM fdb_dif.fdb_monograph_pem;

CREATE VIEW ppsnepl.fdb_plblwarnings_v
AS
   SELECT * FROM fdb_dif.fdb_plblwarnings;

GRANT SELECT ON ppsnepl.fdb_gcnseqno_pem_v TO ppsnepl_read_only_role;
GRANT SELECT ON ppsnepl.fdb_gcnseqno_plblw_v TO ppsnepl_read_only_role;
GRANT SELECT ON ppsnepl.fdb_monograph_pem_v TO ppsnepl_read_only_role;
GRANT SELECT ON ppsnepl.fdb_plblwarnings_v TO ppsnepl_read_only_role;