CREATE OR REPLACE trg_login AFTER LOGON ON DATABASE IS
  v_firstpart VARCHAR2(30);
BEGIN
  v_firstpart := SUBSTR(CURRENT_USER(), 1, INSTR(CURRENT_USER(), '_'));

  EXECUTE IMMEDIATE 'ALTER SESSION SET ROLE = ' || v_firstpart || '_ROLE IDENTIFIED BY bread';
END;