Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

SYSCONTEXT returns NULL for USERENV, parameter CLIENT_IDENTIFIER

We used the parameter CLIENT_IDENTIFIER in our applications logic for logging and security issues. This parameter is described in https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/SYS_CONTEXT.html

But suddenly, it has stopped working and next query returns NULL value:

SELECT SYS_CONTEXT ('USERENV', 'CLIENT_IDENTIFIER') FROM DUAL;

It doesn't matter if it's executed in SQL Developer, sqlplus, java application or whatever, always return NULL now.

Do you know the explanation for this change of behaviour and how can we go back to previous situation?

NOTE:

In the meanwhile, we have found a workaround using this other query:

select substr(program, 1, 30) from v$session where audsid = SYS_CONTEXT('USERENV','sessionid');

But we need the expected result for us from ‘CLIENT_IDENTIFIER’.

Comments
Post Details