Hello All,
I am having an issue with a log in trigger. I have looked at many examples and I dont understand why I am getting the error. It is preventing the log in, so is it working and if so why is it saying there is an error in the trigger?
oracle 19.21 multi
CREATE OR REPLACE TRIGGER OEM_TRIGGER
AFTER LOGON
ON TEST_OCI.SCHEMA
BEGIN
IF LOWER (SYS_CONTEXT ('userenv', 'session_user')) = ('test_oci')
AND LOWER (SYS_CONTEXT ('userenv', 'module')) = ('oem')
AND LOWER (SYS_CONTEXT ('userenv', 'program')) = ('oms')
AND LOWER (SYS_CONTEXT ('userenv', 'db_name')) IN ('test_instance', ‘test2_instance’)
THEN
NULL;
ELSE
RAISE_APPLICATION_ERROR (-20001, 'Connection to Root CDB with test_oci account is for OEM only.');
END IF;
END;
/
SHOW ERRORS;

Thanks in advance for any ideas
Dave