Re: lost connection to sql server`

Keith G Hicks wrote:

Well it doesn't seem to be SQL. I had my customer call me the moment
they experienced this again. I checked the sql processes from the
server machine and from there it appeared that the client machine was
still connected. But the client could not connect and had to restart.
I also noticed that the time is random. This can happen in 5 minutes
or not at all in over an hour. It also doesn't seemt to have
anything to do with network issues. I've had it happen on my
development machine yesterday. I was away from my computer for 1/2
hour or so and when I came back and closed the app I'm working on, it
crashed saying that it couldn't connect to the sql server (trying to
save some user settings to one of the tables on close). My
development machine is not connected to any other machines. The sql
server and development environment are all on the same drive. So I'm
thinking my app is misbehaving somehow. Maybe an ADO issue.

I guess you did but just in case, did you check your connection string
and MDAC versions?

I also have found a reference to an article where it says that

"...If you make a transition from one state to another, the associated
OnExit, OnChange, and OnEnter events will be evaluated. Because you
might have code within the OnEnter event of the next state to evaluate
and transition it to yet another state, looping could occur. Because
looping indefinitely can cause MicrosoftR SQL ServerT to hang or

the mentioned events are 3 of the 6 workflow events. If you have
anything inside these 3 events that forces a change of state you can
fall into an infinite loop that would hang SQL Server.

Check it here

I don't
think a timer to close the connnection will work because I cannot
predict how long this takes to occur. And that means (unless I'm not
understanding that) the user would have to log back in after I time
him out. I'd rather solve the problem than put a bandaid on it anyway.

if it's random it won't solve the problem, but at least it can help to
minimize it until you find a solution...

Also, I didn't try to ping the server but I did have my customer try
to open a file that resides on the server's HDD from windows explorer
from the workstation. She was able to do that without any trouble so
I knwo the network connection was still fine.

if you're using an OLE DB driver you can set the network protocol to
use when connecting to SQL Server. It may be that somehow it is not
using TPC/IP by default, since there are 5 possibilities (one of them I
never heard of):

- Named pipes
- Windows TPC/IP
- Banyan vines
- Multi-protocol (Windows RPC)


Hope this helps,
Best regards :-)

Guillem Vicens Meier
Dep. Informatica Green Service S.A.
Contribute to the Indy Docs project:
In order to contact me remove the -nospam