SYS_CONTEXT

By | August 5, 2010

A handy little function for quickly grabbing information about where code is running / who is running it.

Common Uses:

Current User Name:

sys_context('USERENV', 'CURRENT_USER');

Current User SID:

sys_context('USERENV', 'CURRENT_USERID');

Database Name (from Init Param):

sys_context('USERENV', 'DB_NAME');

More info can be found in the documentation

Leave a Reply

Your email address will not be published. Required fields are marked *

Turn on pictures to see the captcha *