• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 444
  • Last Modified:

SQL Server 2008 profiler

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
gvamsimba
Asked:
gvamsimba
  • 3
  • 2
  • 2
1 Solution
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
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
 
gvamsimbaAuthor Commented:
hi thanks, but how can I find the hostname in sql server  profiler ? I cannot see any column by that name ?
0
 
gvamsimbaAuthor Commented:
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Kumaraswamy RCommented:
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
 
gvamsimbaAuthor Commented:
Msg 208, Level 16, State 1, Line 1
Invalid object name 'sys.dm_exec_procedure_stats'.
0
 
Kumaraswamy RCommented:
dm_exec_procedure_stats was introduced from SQL Server 2008 onwards.
0
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now