Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

Stored Procedure called more than once

$
0
0

Hello

I'm seeing something strange that I can't figure out.

I have a webservice that takes a few parameters, creates a SqlConnection/SqlCommand and then executes a stored procedure.  Most of the time this works just fine.  However, what happens occasionally is 1 webservice request will create 2 sql sessions.

I just happened to have sql profiler running when this happened.  I could see that there were 2 identical calls to the database with different SPIDs (i.e. sql sessions).  

In some cases it doesn't break anything because it's just doing a select (returning the same data twice).  But there are some cases where it does break (more complex SPs with multiple reads/writes).

So what I'm trying to figure out why there are 2 sessions making the exact same call.  I first checked to see if the user was making the exact same call on multiple threads.  They weren't.  There was just 1 call to the webservice. 

Any ideas?  

Thanks!


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>