Solved

Sp_who2

Posted on 2004-09-03
4
756 Views
Last Modified: 2010-05-18
Hi,

Where or How does the  SP_WHO2 gets the information for which program the user is running?

EX:

54  sleeping   NT AUTHORITY\SYSTEM     HOUDB .     msdb     AWAITING COMMAND     31 0     05/14 09:49:55     SQLAgent - Generic refresher                  
55  sleeping   NT AUTHORITY\SYSTEM     HOUDB  .    msdb     AWAITING COMMAND     14420526     09/03 11:26:34          SQLAgent -Alert Engine                      
56  sleeping   ABC_SYS                    SPERRYWS   . ABC_ENERGY18     AWAITING COMMAND     125687 09/02 18:34:08  Gas Modules                                
57 sleeping    ABC_SYS                    SPERRYWS   . ABC_ENERGY18     AWAITING COMMAND     5000 09/02 17:07:30      Financial Bucket    

The one at the very end is programname which i am interested in.

many thanks.
0
Comment
Question by:crishna1
4 Comments
 
LVL 14

Accepted Solution

by:
Jan_Franek earned 500 total points
ID: 11976075
This info is sent from client at login. It's stored into master.dbo.sysprocesses system table, that is queried by sp_who2
0
 
LVL 34

Expert Comment

by:arbert
ID: 11976528
Agreed--when the application is programmed, you, as the programmer, can change the application name......

if you really wanna see what's going on, run this in query analyzer:

use master
go
sp_helptext sp_who2
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now