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 2000 Forums
 SQL Server Development (2000)
 How can i know the Host name of individual transaction

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-09-20 : 07:06:05
moffoly writes "is there any tools or command in SQL could help me know the host and NT user name of individual transaction ID i get from SQL log.

my server configuration is as following:
OS: windows 2000
SQL Server: SQL 2000

Thanks in advance for any help or advise from you"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-09-20 : 07:06:30
The HOST_NAME() function does the trick.
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-09-20 : 23:56:41
What do you mean the SQL Log? What log? What transaction ID?

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

Hunglech
Starting Member

16 Posts

Posted - 2005-09-21 : 00:06:19
SELECT hostname, program_name, nt_domain, nt_username, loginame FROM master.dbo.sysprocesses WHERE spid = @@SPID
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-09-21 : 00:11:10
What do you mean the SQL Log? What log? What transaction ID?


MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-09-21 : 00:17:32
i think he's reading the server log in EM
and he's referring to spID coz the trace is on

Unless you can see the info you're looking for in this log, and that log is not current anymore (sysprocesses or current activity in EM),
then you can't retrieve that info anymore






--------------------
keeping it simple...
Go to Top of Page
   

- Advertisement -