Check the authentication of session connected in Oracle

Check user is login with OS/Database authentication in Oracle

Following command will help to check the authentication of the connected session:

SQL> conn hr@pdb1
Enter password:
Connected.
SQL> SELECT SYS_CONTEXT('USERENV','AUTHENTICATION_TYPE') "SESSION_USER" from dual;

SESSION_USER
------------------------
DATABASE


SQL> conn / as sysdba
Connected.


SQL> SELECT SYS_CONTEXT('USERENV','AUTHENTICATION_TYPE') "SESSION_USER" from dual;

SESSION_USER
------------------
OS

AUTHENTICATION_TYPE:
DATABASE: Username/password authentication.
OS: Operating system external user authentication.
NETWORK: Network protocol authentication.
PROXY: OCI proxy connection authentication.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.