Author |
Topic |
ding03
Starting Member
6 Posts |
Posted - 2009-01-30 : 04:52:05
|
Hello,When i use Sp_who to see from where anprocess is coming, i don't see anything under hostname.Does anyone knows what is missing on the host computerThanks !!! |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-01-30 : 05:27:06
|
Of course hostname is present with sp_who.See thisspid ecid status hostname loginname blk dbname cmd request_id1 0 background sa 0 NULL RESOURCE MONITOR 02 0 background sa 0 NULL XE TIMER 03 0 background sa 0 NULL XE DISPATCHER 04 0 background sa 0 NULL LAZY WRITER 05 0 background sa 0 NULL LOG WRITER 06 0 background sa 0 NULL LOCK MONITOR 07 0 background sa 0 master SIGNAL HANDLER 08 0 sleeping sa 0 master TASK MANAGER 09 0 background sa 0 master FSAGENT TASK 010 0 background sa 0 master FSAGENT TASK 011 0 background sa 0 master FSAGENT TASK 012 0 background sa 0 master FSAGENT TASK 013 0 background sa 0 master FSAGENT TASK 014 0 background sa 0 master TRACE QUEUE TASK 015 0 background sa 0 master BRKR TASK 016 0 background sa 0 tempdb CHECKPOINT 017 0 background sa 0 master TASK MANAGER 018 0 background sa 0 master BRKR EVENT HNDLR 019 0 background sa 0 master BRKR TASK 020 0 sleeping sa 0 master TASK MANAGER 021 0 background sa 0 master BRKR TASK 022 0 sleeping sa 0 master TASK MANAGER 023 0 sleeping sa 0 master TASK MANAGER 024 0 sleeping sa 0 master TASK MANAGER 025 0 sleeping sa 0 master TASK MANAGER 026 0 sleeping sa 0 master TASK MANAGER 027 0 sleeping sa 0 master TASK MANAGER 028 0 sleeping sa 0 master TASK MANAGER 030 0 sleeping sa 0 master TASK MANAGER 051 0 sleeping PHBGPELA NT AUTHORITY 0 msdb AWAITING COMMAND 052 0 runnable PHBGPELA AD\pela 0 Test SELECT 053 0 sleeping PHBGPELA AD\pela 0 master AWAITING COMMAND 054 0 sleeping PHBGPELA AD\pela 0 Test AWAITING COMMAND 055 0 runnable PHBGPELA sa 0 Test SELECT 0 See the correlation between sa account and hostname when hostname is blank?SPID 55 is explicit logged in as sa.SPID 54 is explicit logged in as AD\Pela.SPID 30 and below are system processes and run under sa account. These are not user processes. E 12°55'05.63"N 56°04'39.26" |
 |
|
AvanthaSiriwardana
Yak Posting Veteran
78 Posts |
Posted - 2009-01-30 : 05:53:32
|
its a normal case even i get the same thing when execute sp_who.:)Avantha Siriwardana |
 |
|
ding03
Starting Member
6 Posts |
Posted - 2009-01-30 : 08:23:11
|
52 0 runnable stat dd-dc 0 AfcCookedIFSV2_OSLO SELECT 51 0 sleeping stat 51 AfcCookedIFSV2_OSLO SELECT I use php to do some selection from another pc, then i execute sp_who with the SQL Query Analyser on the Server 'dd-dc'.so i have 2 processus with the login stat, the first hostname is dd-dc(SQL Query Analyser), but the seconde doesn't have hostname(from another host ). how can i show the hostname of the seconde PC in the list? |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-01-30 : 08:40:16
|
Rewrite sp_who? E 12°55'05.63"N 56°04'39.26" |
 |
|
ding03
Starting Member
6 Posts |
Posted - 2009-01-30 : 09:18:17
|
I don't think it's a problem of sp_who, i use easyphp to execute php code, may be i should define the hostname with apache or easyphp. but i don't knw where. |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-01-30 : 09:38:18
|
You can set application name in your connection string and maybe also your host name. E 12°55'05.63"N 56°04'39.26" |
 |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-01-30 : 09:55:45
|
I would rather use sp_who2 than sp_who for detailed info regarding Program name and else. |
 |
|
ding03
Starting Member
6 Posts |
Posted - 2009-01-30 : 10:36:02
|
i don't know where to set the application name, my application php use easyphp to execute the query.and i didn't find the right config in apache or php or easyphpsp_who2 doesn't display the hostname. |
 |
|
ding03
Starting Member
6 Posts |
Posted - 2009-02-01 : 18:07:46
|
no other answers? thanks |
 |
|
ding03
Starting Member
6 Posts |
Posted - 2009-02-02 : 05:37:32
|
quote: Originally posted by Peso Of course hostname is present with sp_who.See thisspid ecid status hostname loginname blk dbname cmd request_id1 0 background sa 0 NULL RESOURCE MONITOR 02 0 background sa 0 NULL XE TIMER 03 0 background sa 0 NULL XE DISPATCHER 04 0 background sa 0 NULL LAZY WRITER 05 0 background sa 0 NULL LOG WRITER 06 0 background sa 0 NULL LOCK MONITOR 07 0 background sa 0 master SIGNAL HANDLER 08 0 sleeping sa 0 master TASK MANAGER 09 0 background sa 0 master FSAGENT TASK 010 0 background sa 0 master FSAGENT TASK 011 0 background sa 0 master FSAGENT TASK 012 0 background sa 0 master FSAGENT TASK 013 0 background sa 0 master FSAGENT TASK 014 0 background sa 0 master TRACE QUEUE TASK 015 0 background sa 0 master BRKR TASK 016 0 background sa 0 tempdb CHECKPOINT 017 0 background sa 0 master TASK MANAGER 018 0 background sa 0 master BRKR EVENT HNDLR 019 0 background sa 0 master BRKR TASK 020 0 sleeping sa 0 master TASK MANAGER 021 0 background sa 0 master BRKR TASK 022 0 sleeping sa 0 master TASK MANAGER 023 0 sleeping sa 0 master TASK MANAGER 024 0 sleeping sa 0 master TASK MANAGER 025 0 sleeping sa 0 master TASK MANAGER 026 0 sleeping sa 0 master TASK MANAGER 027 0 sleeping sa 0 master TASK MANAGER 028 0 sleeping sa 0 master TASK MANAGER 030 0 sleeping sa 0 master TASK MANAGER 051 0 sleeping PHBGPELA NT AUTHORITY 0 msdb AWAITING COMMAND 052 0 runnable PHBGPELA AD\pela 0 Test SELECT 053 0 sleeping PHBGPELA AD\pela 0 master AWAITING COMMAND 054 0 sleeping PHBGPELA AD\pela 0 Test AWAITING COMMAND 055 0 runnable PHBGPELA sa 0 Test SELECT 0 See the correlation between sa account and hostname when hostname is blank?SPID 55 is explicit logged in as sa.SPID 54 is explicit logged in as AD\Pela.SPID 30 and below are system processes and run under sa account. These are not user processes. E 12°55'05.63"N 56°04'39.26"
Can you tell me why 'SPID 30' doesn't have hostname? and why 'SPID 52' has the hostname,can we replace its hostname by a blank space? |
 |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-02 : 08:56:17
|
Spid less than or equal to 50 are System processes.You should not worry about them . |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-02-02 : 09:04:59
|
Already said...quote: Originally posted by Peso SPID 30 and below are system processes and run under sa account. These are not user processes.
E 12°55'05.63"N 56°04'39.26" |
 |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-02 : 09:11:55
|
quote: Originally posted by Peso Already said...quote: Originally posted by Peso SPID 30 and below are system processes and run under sa account. These are not user processes.
E 12°55'05.63"N 56°04'39.26"
oops I didn't notice that. That should be 50 or less. |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-02-02 : 09:21:21
|
Yes. You are right about 50 as the limit for SQL Server system processes.In the table with my testdata, it is 30 that is current maximum system process. E 12°55'05.63"N 56°04'39.26" |
 |
|
|