I have a created a trigger that is type of "AFTER LOGON ON DATABASE" . This trigger captures user session information and inserts into a table. The table "SESSIONSHISTORY" has a primary key on sessionid using value from dba_audit_trail.sessionid.
I sometimes receive the following errors .
ORA-20001: error:
ORA-00001: unique constraint (XXXXXXXXXXX_PK) violated
debug output: USERENV, SESSIONID: 999999999
debug output: USERENV, SESSION_USER: PUBLIC
debug output: USERENV, OS_USER: XXXXXXX
The output above is generated from the trigger "WHEN OTHERS THEN" section
sys.dbms_system.ksdwrt (2, 'debug output: USERENV, SESSION_USER: ' || SYS_CONTEXT ('USERENV', 'SESSION_USER'));
I'm trying to identify what and who is public? I have no public user.?
Thank you for your help and assistance.