Subject: user login information
Posted By: Tee88 Post Date: 11/1/2005 12:04:36 PM
Hi all:

Does anyone know how to pull domain name and user name of current logged on user from Windows 2000/Xp and put it in a html form or sql db?  Everything I try does not work.  

Please help!!!! PLEASE

Thanks!

Reply By: mateenmohd Reply Date: 11/8/2005 4:29:37 AM
in asp  like this (only one user)

name = Request.ServerVariables("logon_user")
Response.Write(name)



if your want to find user login information, which user
is access / login in you sql server, you can find by this query


SELECT Hostname 'Connected User', db_name(dbid) 'Database', Program_Name, Count(Program_Name) 'Connections'
FROM master.dbo.sysprocesses Where HostName <> '' And db_name(dbid) <> 'master'
Group By Hostname, db_name(dbid), Program_Name


regards

Mateen


Reply By: Tee88 Reply Date: 11/11/2005 9:21:46 AM
Thannks!!!!!


Go to topic 33240

Return to index page 438
Return to index page 437
Return to index page 436
Return to index page 435
Return to index page 434
Return to index page 433
Return to index page 432
Return to index page 431
Return to index page 430
Return to index page 429