all groups > sql server (alternate) > august 2007 >
You're in the

sql server (alternate)

group:

SQL Profiler - SPID


SQL Profiler - SPID wesleym312 NO[at]SPAM gmail.com
8/20/2007 12:28:04 AM
sql server (alternate): Hi,
What is the SPID column for in SQL Profiler?
I have many databases but I only want to view the transactions on one
particular database. What changes should I make to the filters inorder
to achieve this. I have tried database name but that doesnt work.

Thanks in advance
Wes
Re: SQL Profiler - SPID dba NO[at]SPAM sql-labs.com
8/20/2007 7:53:09 AM
[quoted text, click to view]

Hi Wes,

If for some reason the DatabaseName filter doesn't work, you can try
to filter by DatabaseID instead. To get the ID of your database, run
select db_id() against the database.

I also suggest you try out the tool SQL Trace Analyzer. It allows you
to filter your trace with very high granularity and provides detailed
information about your trace that's easy to understand. You can
download it from here: http://www.lakesidesql.com/tadownload/traceanalyzersignup/trace_analyzer_signup.aspx.

HTH
Re: SQL Profiler - SPID Fritz Franz
8/20/2007 11:03:42 AM
<wesleym312@gmail.com> ha chiesto

[quoted text, click to view]

http://msdn2.microsoft.com/en-us/library/aa933157(SQL.80).aspx

Regards,

Fritz

Re: SQL Profiler - SPID Erland Sommarskog
8/20/2007 9:56:57 PM
(wesleym312@gmail.com) writes:
[quoted text, click to view]

SPID is the session id, and this is column is very good when you want to
watch a single process.

If you you want to view events from many sessions for one database, use
database id, this column is more often populated.

Note however that by default, you also get events where the filtered
column is not populated. On SQL 2000 this is difficult to avoid. On
SQL 2005 there is a checkbox for this.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
AddThis Social Bookmark Button