Solved

Sp_who2

Posted on 2004-09-03
4
769 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

632 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