views:

40

answers:

2

I'm running SQL Profiler 2008 on my application to get a better feel for what my application is doing at the DB level. There are some columns in the output that are unclear to me as to what they mean:

1) SPID: I'm using a single connection to the DB to do all my database activity. Yet I see several different SPID values. What does SPID refer to? I would have thought that since I'm using a single connection, I would only see one SPID.

2) EventSequence: For EventClass 'RPC:Completed' I see values for this column. For EventClass 'SQL:StmtCompleted' I don't see anything.

Thanks.

A: 

Google is your friend.

The first link states that it's the session ID

The first link states that it indicates the actual order that the events took place.

As for your multiple session ID's to one connection, bear in mind that (assuming you're using ADO.NET) the default settings for connecting to a SQL Server data source use .NET's connection pooling, which means that there is not a 1:1 ration between SqlConnection instances and actual database connections.

Adam Robinson
@Adam - Thanks but that doesn't really address my question regarding what relationship an SPID has with a DB connection.
Randy Minder
@Randy: My last sentence doesn't address your question?
Adam Robinson
@Adam - It does now after you edited your initial response.
Randy Minder
A: 

SPID shows each process so if you run different processes within your single connection those would have different ID numbers.

As for EventSequence I found a forum that poses a different question but mentions what exactly 'RPC:Completed' and 'SQL:StmtCompleted' are.

Kyra

related questions