Solved

Can a SQL connection have more than one spid?

Posted on 2013-01-31
6
357 Views
Last Modified: 2013-10-09
Hi,

We are having some connection problems with SQL server 2008.
SQL gets an error and creates a mini dump when we run the program.
One curious question is can a connection only have one spid at a time?
Or can it have multiple and how does it relate to the connection pool.
The other thing is they have been changing the database status from multi user mode to single user and then it is changed back to multiple user.

Were thinking something is happening when it changes between single and multi user mode and the connections in the pool and the active connection.
0
Comment
Question by:remenard
  • 3
  • 2
6 Comments
 
LVL 39

Accepted Solution

by:
lcohan earned 500 total points
ID: 38840426
"SQL gets an error and creates a mini dump when we run the program" - for that you need to open a case(call) to the vendor which in this case is Microsoft and send them the DUMP file(s) to be analyzed.

"The other thing is they have been changing the database status from multi user mode to single user and then it is changed back to multiple user.

Were thinking something is happening when it changes between single and multi user mode and the connections in the pool and the active connection. "

when "they" change the database in single user mode then...obviously only 1(ONE) user or ONE connection can be made so...you draw the conclusion. the rest must be terminated somhow and if "they" use the "rollback immediate" as well then yes...you can have lots of issues and should never be done against live DB's in my opinion.

Also a SQL SPID is tied to only ONE connection.
0
 
LVL 9

Expert Comment

by:MattSQL
ID: 38842369
Yes 1 connection = 1 SPID, connection pooling is when multiple application sessions/users are able to reuse existing connections...

What is the error that SQL is returning?
0
 

Author Comment

by:remenard
ID: 38855563
The error we are getting we trap is after it tried to set the database to multi user mode.

Setting Database to Multi User Mode.
Failed to connect to server .

The error does not seem to trap more information, sorry to say,
checked SQL server logs nothing and checked event logs nothing there either.
The application is C# using Dot Net SQL libraries and our own.

Wish I had more information but all I have at the moment.
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

Author Comment

by:remenard
ID: 38859812
The other two things I found out is that they have added the service broker to the database.
The database could also have replication running as well in some cases.
I would guess this would make the connections issue more complex.

Would it be better to go through and kill each spid by it self and then change from multi user to single user?  
Not sure that would help clear out the connetions better thatn via the database mode change.

Thanks.
0
 
LVL 9

Expert Comment

by:MattSQL
ID: 39316169
I'm sorry - this slipped off my radar. Do you still need assistance?
0
 

Author Comment

by:remenard
ID: 39560282
Sorry, we been swamped, looks like it was connection that was created in an application and then passed to another module when it should not of been.
Thanks for you help.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now