ALTER SESSION SET CONTAINER IN "ON LOGON TRIGGER" IS NOT WORKING. ROLES NOT ENABLED, WHEN SET CONTAINER COMMAND EXECUTED THROUGH TRIGGER. (Doc ID 2237916.1)

Last updated on MARCH 04, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Information in this document applies to any platform.

Symptoms

Customer wants to use OS authentication to PDBs in their scripts and batch
jobs.
As remote_os_authent is deprecated, they want to avoid remote_os_authent.

Without setting remote_os_authent, OS authentication directly to PDB is not
possible.

So customer wrote a logon trigger in CDB to change the container from CDB to
PDB for OS authentications. Here the DB roles were not enabled until customer
executes the command 'set role all' explicitly after login.

If the command 'alter session set container=PDB' is executed directly in
sql*plus ( not through trigger), then the roles were enabled correctly.

But customer doesn't want to change their scripts/batch jobs to include this
command 'alter session set container=PDB'. They want this to be done thru
trigger.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms