February 2, 2010 at 3:13 am
Can any one of you help me getting the query/command to stop the execution of a stored procedure?
I tried in the following way:
1. I created a stored procedure in a database
2. Opened the SQL Profiler and cleared the statements
3. executed the sp and then stopped it using the stop option available in SSMS.
4. When I saw the profiler, I didn't get any query performed to stop the batch.
Can any one of you help me in getting the query/command to stop the execution of a stored procedure.
February 2, 2010 at 4:02 am
When you hit 'cancel query' or 'stop' in SSMS, it sends an out-of-band data packet which is recognized as an Attention by the server. You can see Attention events via Profiler.
Why on earth might this information be useful to you?
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
February 2, 2010 at 4:07 am
I was asked this question in the interview of Microsoft..
So i was looking out the answer...
February 2, 2010 at 4:27 am
Odd question to be asked, but that's the answer:
The Profiler event is Attention - you'll find it in the Errors and Warnings event group.
There is no query - it's a special data packet.
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply