Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CAPTURING COMPUTER NAME.........

Status
Not open for further replies.

asociate

Programmer
Apr 14, 2002
17
0
0
IN
Hi,

I have developed a program which monitors the user status who r logged in and the time they spent on the ERP database.In this erp application when a user logs in it updates the status as '1' in a table and '0' when he logs off.
Is there any way to capture the computer name from where the user is logged in i.e. from which system the user had logged in.
when the system updates the status field as '1' then i should be able to know which system has updated this field to '1'.

Is there any function or query which can help me to find this out.
Iam using MSSQL 7.0

 
Check out the sysprocesses table in the master database.
 
You can also use the system function HOST_NAME() to capture the host computer name of the current session.

Declare @host varchar(60)
Select @host=host_name()
Print @host Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top