program column is null in v$session
The value for PROGRAM is set by the client application.  I'm not sure if it is set before or after a login.

I'll have to verify - I suspect something like Tomcat can set PROGRAM to NULL.

Other Notes


SYS_CONTEXT( 'USERENV', 'CLIENT_PROGRAM_NAME' ) might be a better method.
The value usually comes from the name of the executable.


IIRC - there is a function within the drivers to set the value to something else.

A simple RENAME/mv will bypass your LOGIN TRIGGER.


Limiting login acceptance of users based on the value of PROGRAM is a futile effort.