Solved

Sp_who2

Posted on 2004-09-03
4
764 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

734 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