Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 can we get the system Name

Author  Topic 

boreddy
Posting Yak Master

172 Posts

Posted - 2009-01-28 : 04:07:14
My sql server 2005 in the server
many users connected to the that user (all users have same username and password)
if the one user is changed the databse can we get that user systen name systeam name

thank you in advance

AvanthaSiriwardana
Yak Posting Veteran

78 Posts

Posted - 2009-01-28 : 04:13:41
CURRENT_USER :- for get the current user and HOST_NAME :- to get the host name

Avantha Siriwardana
Go to Top of Page

boreddy
Posting Yak Master

172 Posts

Posted - 2009-01-28 : 04:56:01
Here i need to get system login names ( who connected to the server that persions system login name)
Go to Top of Page

AvanthaSiriwardana
Yak Posting Veteran

78 Posts

Posted - 2009-01-28 : 05:02:31
do you mean users who have logged into the sql server ??



Avantha Siriwardana
Go to Top of Page

AvanthaSiriwardana
Yak Posting Veteran

78 Posts

Posted - 2009-01-28 : 05:08:16
SELECT @@SERVERNAME

Avantha Siriwardana
Go to Top of Page

raky
Aged Yak Warrior

767 Posts

Posted - 2009-01-28 : 05:42:04
try this

exec sp_who2
Go to Top of Page
   

- Advertisement -