Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Can a SQL connection have more than one spid?

Posted on 2013-01-31
6
Medium Priority
?
398 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 40

Accepted Solution

by:
lcohan earned 1500 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 10

Expert Comment

by:Matt Bowler
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 10

Expert Comment

by:Matt Bowler
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

618 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