Home » Developer & Programmer » Forms » How to find User (who is connected to AS) in 3-Tier Architecture
How to find User (who is connected to AS) in 3-Tier Architecture [message #225727] Wed, 21 March 2007 02:46 Go to next message
anil_mk
Messages: 137
Registered: August 2006
Location: Bangalore, India
Senior Member

Hi all,


Consider i am going to use my application(3-Tier), when i connect to my application it will firct connect to Application Server and where i want to know the which user has connected to Server. In 2-Tier client/server we have used the
1-->Tool_Env.Getvar('HOMEDRIVE', home_drive);-->which is C:
2-->Tool_Env.Getvar('HOMEPATH', home_path);-->Which is \Documents and settings\anil_mk as considering my system.
But i used the same in 3-Tier which is no working & displaying nothing, means how to find the User who connects to application.
Here i want the user like which i mentioned above( C:\\Documents and settings\anil_mk)

And another way is to use
Tool_Env.Getvar('TEMP', varchar_var);
Here in my system for 2-Tier Architecture displayed
C:\DOCUME~1\anil_mk\LOCALS~1\Temp
But same for 3-Tier Architecture not displayed anything.
Please Suggest me, are there any other methods to be implemented in 3-Tier Architecture.


Regards
Anil Mk

[Updated on: Wed, 21 March 2007 03:00]

Report message to a moderator

Re: How to find User (who is connected to AS) in 3-Tier Architecture [message #225731 is a reply to message #225727] Wed, 21 March 2007 02:59 Go to previous messageGo to next message
Umar Farooq
Messages: 3
Registered: March 2007
Junior Member
Have You Solved your Problem?
Re: How to find User (who is connected to AS) in 3-Tier Architecture [message #225747 is a reply to message #225731] Wed, 21 March 2007 04:23 Go to previous messageGo to next message
anil_mk
Messages: 137
Registered: August 2006
Location: Bangalore, India
Senior Member

Which problem were you talking about.
But problem which i mentioned in above post not yet solved.
If you have any idea or suggestions plz let me know.

AnilMK
Re: How to find User (who is connected to AS) in 3-Tier Architecture [message #225909 is a reply to message #225747] Wed, 21 March 2007 22:28 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Search this forum for 'sys_context' and see what other users have done.

David
Re: How to find User (who is connected to AS) in 3-Tier Architecture [message #226002 is a reply to message #225909] Thu, 22 March 2007 04:26 Go to previous messageGo to next message
anil_mk
Messages: 137
Registered: August 2006
Location: Bangalore, India
Senior Member

Hi David,

[In 3-Tier]
As per your suggestion i tried to get the username who has connected to the application by using 'sys_context' (i.e.in my application form [ select sys_context('USERENV','OS_USER') into variable from dual; ] And displayed that variable which SYSTEM and i used [ select sys_context('USERENV','IP_ADDRESS') into variable from dual; ] which displayed the IP Address of Application Server.

[2-Tier]
And same thing i tried in local system,here i got the OS_USER as anil_mk which is correct and IP_ADDRESS which is also correct.

Please can you tell me exactly which function should we use to get the client system name e.g. which we got in 2-Tier as anil_mk Means if i connect to the application, the application should find the system name of the user who is connected.



Regards
AnilMK

[Updated on: Thu, 22 March 2007 04:29]

Report message to a moderator

Re: How to find User (who is connected to AS) in 3-Tier Architecture [message #226003 is a reply to message #225909] Thu, 22 March 2007 04:28 Go to previous messageGo to next message
anil_mk
Messages: 137
Registered: August 2006
Location: Bangalore, India
Senior Member

Hi,

[2-Tier as well as in 3-Tier Archi]
I tried select USERENV('CLIENT_INFO') into var from dual;
and which wasn't display anything.

[Updated on: Thu, 22 March 2007 04:51]

Report message to a moderator

Re: How to find User (who is connected to AS) in 3-Tier Architecture [message #226214 is a reply to message #226003] Thu, 22 March 2007 20:47 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have a look at the thread http://www.orafaq.com/forum/m/211491/67467/?srch=WebUtil_ClientInfo#msg_211491 which uses the 'WebUtil_ClientInfo' procedure - there is 'Get_IP_Address' and 'Get_User_Name'.

David
Re: How to find User (who is connected to AS) in 3-Tier Architecture [message #226357 is a reply to message #226214] Fri, 23 March 2007 06:16 Go to previous messageGo to next message
anil_mk
Messages: 137
Registered: August 2006
Location: Bangalore, India
Senior Member

Hi David,


Thanks,its working and here i ran my application from two different systems and i displayed the message by using message(webutil_clientinfo.get_ip_address);.In first system i got the correct IP Address and from another system i got Autoconfiguration IP Address why such a case.


Regards
AnilMK


[Updated on: Fri, 23 March 2007 06:16]

Report message to a moderator

Re: How to find User (who is connected to AS) in 3-Tier Architecture [message #226896 is a reply to message #226357] Mon, 26 March 2007 20:26 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I think (I don't know) that the information you are getting back comes from the 'client_info' column of the 'v$session' view.
select client_info 
  from v$session 
 where client_info is not null

Have a look at this view on your system and verify the data that it contains.

David
Previous Topic: Import data from excel sheet to database tables...
Next Topic: HOW TO ADD CLAUSE
Goto Forum:
  


Current Time: Mon Dec 05 11:08:02 CST 2016

Total time taken to generate the page: 0.14271 seconds