Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL Server 2008 profiler

Posted on 2013-05-23
7
Medium Priority
?
436 Views
Last Modified: 2013-05-28
Hi, I have to find out all the stored procedures being called from my application (.net).
But currently my profiler is showing me all the users activity details as the application is being
used by many users. But I just want to filter on my activities.

I am planning to filter based on spid's, but not sure how the application assigns the spid's.

Can any one let me know if this is a good idea or is there any better idea than this to filter
only my activities ?

Many Thanks
0
Comment
Question by:gvamsimba
[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
  • 3
  • 2
  • 2
7 Comments
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 39190318
If you are using a different login, then probably you can filter the activities based upon your user name in Profiler trace.
Or else, if you are hitting the DB Server from your system which has the application client, then you can filter the trace based upon your hostname to filter your events only.
0
 

Author Comment

by:gvamsimba
ID: 39190363
hi thanks, but how can I find the hostname in sql server  profiler ? I cannot see any column by that name ?
0
 

Author Comment

by:gvamsimba
ID: 39190436
hi, i got the column hostname, but my .net application is not passing my acutal hostname,
it is just passing a generic name for all users.

is there no way in sql server profiler that I can filter on my own events ?

Thanks
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 29

Accepted Solution

by:
Kumaraswamy R earned 2000 total points
ID: 39190454
select *,b.name, a.last_execution_time
from sys.dm_exec_procedure_stats a
inner join sys.objects b on a.object_id = b.object_id
--where DB_NAME(database_ID) = 'dB'


or

try
Read the Trace
 
If we wished, we could save these events into a file using File > Save As > Trace File, or as a SQL table (File > Save As > Trace Table).  We particularly like saving trace data to a SQL table, as it allows us to search for specific text quickly (using SELECT * FROM tableName WHERE textdata LIKE ‘%text%’), or get the top 10 most expensive queries in terms of reads (using SELECT top 10 * FROM tableName ORDER BY Reads DESC). But again, today, we only need to see what stored procedures are being called

http://www.petri.co.il/monitoring-with-sql-profiler.htm
0
 

Author Comment

by:gvamsimba
ID: 39190468
Msg 208, Level 16, State 1, Line 1
Invalid object name 'sys.dm_exec_procedure_stats'.
0
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 39190530
dm_exec_procedure_stats was introduced from SQL Server 2008 onwards.
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 39193369
gvamsimba,

If your application is not using Hostname properly and you are using a generic login, then without shutting down all other users you cannot identify the events for your session alone.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

715 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