Page MenuHomePhabricator
Paste P218

(An Untitled Masterwork)
ActivePublic

Authored by stwalkerster on Aug 17 2018, 8:10 AM.
Tags
None
Referenced Files
F88466:
Aug 17 2018, 8:10 AM
Subscribers
None
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;

Event Timeline

stwalkerster created this object with visibility "Public (No Login Required)".