Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
obgc
Starting Member
5 Posts |
Posted - 2009-11-30 : 08:55:37
|
Hi,I am new here and please forgive me if it's not the right place for such question.I have an application which goes in a loop - something like this:Open Connection1Retrieve Data (recordset) for the LOOPLOOP BEGIN (for each record from the statement above) Open Connection2 (to the same server, the same database, the same user) Execute SELECT Statement Execute INSERT Statement Close Connection2LOOP ENDClose Connection1So I have maximum 2 simultaneous connections. What happens is that after some time (somewhere there in the middle of the loop - which of course shows that the loop and connections work properly) I get a message "Server does not exist or access denied" and my application "breaks". What is interesting that the "deny message" shows usually almost in the same place - there may be several loops more or less processed. I have also executed my app locally on the SQL server so network problems can be removed for the list of suspects.Could You tell me if there is some kind of a configuration which tells SQL Server to block next connection as the client used too many of them in a small period of time? Is it something like "anti-DOS attack" protection? Any other ideas why the SQL denies the connection?How can I tell SQL to allow my application to finish the loop and use as many connections as it wants?I know that I can always redesign the app, but the problem is that it's not mine and I don't have the source codes [and it does something more than just the loop above :) ]I need some help, please respond.Greg |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2009-11-30 : 11:01:19
|
It's not a denial of service by SQL Server. I've got database servers that process thousands of open connections at a time.You're encountering a connectivity issue. You are losing your connection to the database server and that needs to be fixed. Checked SQL Server's error log to see if the service is restarting or something. The network is still used when you execute the app locally, so you can not remove network issues from your list of suspects.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog"Let's begin with the premise that everything you've done up until this point is wrong." |
 |
|
obgc
Starting Member
5 Posts |
Posted - 2009-12-01 : 05:35:24
|
quote: Originally posted by tkizer You're encountering a connectivity issue. You are losing your connection to the database server and that needs to be fixed.
That's not good. I think it may be hard to find the cause of the problem.quote: Checked SQL Server's error log to see if the service is restarting or something.
I took a look into "Event viewer" in "Application" section but unfortunately I did not find any entries for my problem.quote: The network is still used when you execute the app locally, so you can not remove network issues from your list of suspects.
I understand, thanks a lot. I keep on searching for the resolution.If You have any other ideas, please do not hesitate to write.Greg |
 |
|
obgc
Starting Member
5 Posts |
Posted - 2009-12-01 : 08:03:39
|
Hi,Today I received other message. Strange.[DBNETLIB] [ConnectionOpen (PreLoginHandshake()).] Allgemeiner Netzwerkfehler. Weitere Informationen finden Sie in der Dokumentation ....Which means something like "General network error".Does that mean that my problems come from some network problems?What is also strange that the process finishes (crashes) always in more or less the same place (this process generates a local file and it is always something around 700KB, sometimes 698, sometimes 702, ...) Looks as it comes to a point, number of cycles of the loop, ...? I just can;t tell what's wrong.Any other ideas?ThanksGreg |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
obgc
Starting Member
5 Posts |
Posted - 2009-12-01 : 14:53:13
|
quote: Originally posted by tkizer Yes it does sound like network problems. I'd suggest adding an alias to the client machines to ensure it gets to the listening port fast.
OK. I'll try this but how can it explain the behaviour that the app receives error always around the same point in time? This remains very strange to me. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
obgc
Starting Member
5 Posts |
Posted - 2009-12-01 : 15:52:02
|
Sure, thanks a lot! |
 |
|
|
|
|
|
|