Home » Developer & Programmer » Forms » how to get the windows user name and the domain name ?
how to get the windows user name and the domain name ? [message #181908] Wed, 12 July 2006 02:44 Go to next message
haitham
Messages: 60
Registered: February 2006
Member
how to get the windows user name and the domain name in an application trigger like <when-new-form-instance>...
plz i need help and ideas.
thanks alot..
Re: how to get the windows user name and the domain name ? [message #181947 is a reply to message #181908] Wed, 12 July 2006 05:42 Go to previous messageGo to next message
rana.irfan@arzootex.com
Messages: 15
Registered: June 2006
Location: Faisalabad.
Junior Member

Dear,
you can get Domain Name like this query.

Select Userenv('TERMINAL') FROM Dual;

Regards,

Rana Irfan
Re: how to get the windows user name and the domain name ? [message #181949 is a reply to message #181947] Wed, 12 July 2006 05:50 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
That does not work in a web based Forms environment, I'm afraid.
Re: how to get the windows user name and the domain name ? [message #181995 is a reply to message #181947] Wed, 12 July 2006 09:20 Go to previous messageGo to next message
haitham
Messages: 60
Registered: February 2006
Member

but it retrieves the machine name , i need to retrieve the windows user name (which the user logged in with to the windows)
and also the domain name ??...
thanks alot..
Re: how to get the windows user name and the domain name ? [message #181996 is a reply to message #181949] Wed, 12 July 2006 09:22 Go to previous messageGo to next message
haitham
Messages: 60
Registered: February 2006
Member
i am using client server environmet (dev6i) , not web based and so i need to know how to get them !!..
thanks alot .

[Updated on: Wed, 12 July 2006 09:23]

Report message to a moderator

Re: how to get the windows user name and the domain name ? [message #181997 is a reply to message #181996] Wed, 12 July 2006 09:38 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Select sys_context('USERENV','OS_USER') FROM Dual;

MHE

[Updated on: Wed, 12 July 2006 09:41]

Report message to a moderator

Re: how to get the windows user name and the domain name ? [message #182012 is a reply to message #181997] Wed, 12 July 2006 10:21 Go to previous messageGo to next message
haitham
Messages: 60
Registered: February 2006
Member

thanks alot , it retrieves the user name ,,
i also need to retrieve the domain name , because there is more than one domain at the network and i need to know in which domain the user is ??..

thanks ..
Re: how to get the windows user name and the domain name ? [message #182103 is a reply to message #182012] Thu, 13 July 2006 01:29 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
I don't know by hart. What does the documentation tell you? And have a look at the MACHINE column in V$SESSION.

MHE
Re: how to get the windows user name and the domain name ? [message #182528 is a reply to message #182103] Sun, 16 July 2006 06:37 Go to previous messageGo to next message
haitham
Messages: 60
Registered: February 2006
Member
sorry for late ,thank you very much ..that is what i need..
Re: how to get the windows user name and the domain name ? [message #183127 is a reply to message #181908] Wed, 19 July 2006 08:25 Go to previous messageGo to next message
vikasg2006
Messages: 80
Registered: March 2006
Location: Dubai
Member
hello
the above queries gives the appropriate results. thanks. But if i need I.P. address of user instead of name then how can i fetch is i.e. means by which command?
i am using forms 6i+oracle 8i
vikas
Re: how to get the windows user name and the domain name ? [message #183204 is a reply to message #181908] Wed, 19 July 2006 23:00 Go to previous messageGo to next message
Rehan Mirza
Messages: 67
Registered: July 2004
Location: Pakistan
Member

Use this query for IP Address

Select sys_Context('UserEnv','IP_Address') IP_ADDRESS from Dual;

take care
Re: how to get the windows user name and the domain name ? [message #183206 is a reply to message #183127] Wed, 19 July 2006 23:02 Go to previous message
rana.irfan@arzootex.com
Messages: 15
Registered: June 2006
Location: Faisalabad.
Junior Member

hi,

you can get IP address like this.

1* select sys_context('USERENV','IP_ADDRESS') IP FROM DUAL
SQL> /

IP-ADDRESS
-----------
10.10.0.127

I think this Command 'll solved your problem.

Regards,

Rana Irfan
Previous Topic: how to retrive machine name from sql/d2k
Next Topic: how to indentify a user name with a password containing & character
Goto Forum:
  


Current Time: Fri Sep 20 12:37:02 CDT 2024