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: , , ,

This entry was posted on Monday, March 8th, 2010 at 21:39 and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

 

Leave a Reply