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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Insert information about currently conn user.

Author  Topic 

Wodzu
Yak Posting Veteran

58 Posts

Posted - 2007-08-25 : 05:44:16
Hello folks :)

I would like to know, how to get some unique ID that describes user which is currently connected to the database. Since I wrote an application which can be used by mutliple users and I would like to log their activity. Thanks in advance!

spejbl
Starting Member

28 Posts

Posted - 2007-08-25 : 06:39:34
[code]SELECT @@SPID[/code]Books Online > @@SPID
[url]http://msdn2.microsoft.com/en-us/library/ms189535.aspx[/url]


--
Tom
Microsoft KB articles monitoring | Apple KB articles monitoring
Go to Top of Page

Wodzu
Yak Posting Veteran

58 Posts

Posted - 2007-08-25 : 16:54:43
Thanks :)
Go to Top of Page
   

- Advertisement -