Save logged on user(name only) in ORACLE when OS based authentication is used

StackOverflow https://stackoverflow.com/questions/23196108

  •  06-07-2023
  •  | 
  •  

Вопрос

em new to oracle and wanted to know that how can i save the username in table from which he is logged on, when i use OS based authentication in oracle.... any guide would be helpful

Thanks in Advance

Это было полезно?

Решение

to get the name of OS user name (like logged user in windows for example) write the following:

select  sys_context('USERENV','OS_USER')  from dual

Другие советы

next query will return to you the name of the user that is logged in:

select user from dual

Now, all you need is to use "user" as a value in your insert statement.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top