Operating System (OS) authentication in Windows
I had a question in training about OS authentication in Windows.
The question was about normal user authentication, not the SYSDBA authentication.
Hmm. I had never used it for authenticating normal users – so I just had to try.
First I need to know which user I am:
SQL> select UPPER(sys_context(‘userenv’,'os_user’)) from dual;
UPPER(SYS_CONTEXT(‘USERENV’,'OS_USER’))
—————————————————————
PASICITRUS\PASI PARKKONEN
SQL>
The next step is to create that user and grant user rights:
create user “PASICITRUS\PASI PARKKONEN” identified externally;
User created.
SQL> grant dba to “PASICITRUS\PASI PARKKONEN”;
Grant succeeded.
Now I can try to connect:
SQL> connect /
Connected.
Who am I..?
SQL> show user
USER is “PASICITRUS\PASI PARKKONEN”
Great, done!
Tags: Operating System Authentication, Oracle, OS Authentication, Windows