Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to see who is running SQL Server Profiler against a certain database and possibly from what machine? Say through Profiler itself or by T-SQL statement.

I wonder if it is even possible to find out Active Directly user name under which the profiler is running.

[UPDATE] As a reference, here is a way to retrieve only SQL Server Profile processes

declare @sp_who2 table (
	SPID	int,
	status	varchar(50),
	login	varchar(100),
	HostName	varchar(100),
	BlkBy	varchar(100),
	DBName	varchar(100),
	Command	varchar(100),
	CPUTime	int,
	DiskIO	int,
	LastBatch	varchar(50),
	ProgramName	varchar(150),
	SPID2	int,
insert	@sp_who2
exec sp_who2

select	*
from	@sp_who2
where	ProgramName like 'SQL Server Profiler - %'
share|improve this question
up vote 6 down vote accepted



Look at the ProgramName column and you will see something like SQL Server Profiler - 362b6154-2d69-4ce0-987b-2573bed3ce45. From that query you can define a user name and HostName...

share|improve this answer
Yes. Thank you, Bogdan. – Sung Jul 4 '09 at 16:07

use SQL Profiler and look for existing connection and login events from application name "SQL Server Profiler - {guid}" where {guid} varies by run (and by default SQL Profiler runs exclude themselves based on its own application name.

share|improve this answer
I was wondering what the jumbled up characters meant. It was "guid". Thank you, richard. – Sung Jul 4 '09 at 16:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.