You may notice that while logged in as the BIOTICS_DLINK user and running SQL statements, the REC_LAST_MOD_USER value is automatically set to BIOTICS_DLINK, regardless of whether you state differently or not in the update/insert statement.  To turn this setting off, which will require the REC_LAST_MOD_USER value to be set in such SQL statements, add an entry to the HDMS_AUDIT_USER_ID table, with the following column values:


INSERT INTO HDMS_AUDIT_USER_ID (HDMS_AUDIT_USER_ID, HDMS_GUI, DISABLE_AUDIT, ORACLE_USER) VALUES (

(SELECT NVL(MAX(HDMS_AUDIT_USER_ID)+1, 1) FROM HDMS_AUDIT_USER_ID),'Y','N','BIOTICS_DLINK');

The key is the HDMS_GUI value. If set to Y, the REC_LAST_MOD_USER value must be provided through the query. This is how the application (known as the HDMS GUI when these triggers and tables were first created) forms its queries. (If a query fails to set REC_LAST_MOD_USER for an update, the query will fail with a cryptic error message, which will occur because the _i and _au triggers will attempt to add an entry to the audit_log table with a null username.)

If you don’t want to always manually set the REC_LAST_MOD_USER value, delete the hdms_audit_user_id entry after updates are finished:


DELETE HDMS_AUDIT_USER_ID WHERE ORACLE_USER='BIOTICS_DLINK';