CREATE OR REPLACE TRIGGER RMAN_CURSOR_SHARING AFTER LOGON ON DATABASE BEGIN if (upper(sys_context('USERENV', 'MODULE')) like '%RMAN%') THEN execute immediate ' alter session set cursor_sharing=EXACT'; END IF; END;