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.
| 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 2000SQL Server: SQL 2000Thanks 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. |
 |
|
|
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?MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
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 |
 |
|
|
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?MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-09-21 : 00:17:32
|
i think he's reading the server log in EMand he's referring to spID coz the trace is onUnless 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... |
 |
|
|
|
|
|