Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / February 2006



Tip: Looking for answers? Try searching our database.

sporadic Runtime Error  -2147467259 "SQL Server does not exist or access denied" in several ADO.Recordset Frunctions.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
slovi@gmx.de - 17 Feb 2006 13:36 GMT
Hello dear Newsgroup!

We are developing an application in MS-VisualBasic SP 6. Our database
is SQL Server 2000.

After a coversion from a Win2000 platform to WinXP we are getting the
following error while opening connections, recordssets, looping through
recordsets with move next or while closing it.

?err.Description
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server existiert nicht oder
Zugriff verweigert.
... in English is should be: Error: SQL Server does not exist or access
denied.

?err.Number
-2147467259

?err.Source
Microsoft OLE DB Provider for SQL Server

?err.HelpContext
1000440

The cryptic on this is that the error occurs randomly and when we catch
the error and try the same ado operation again (Resume)  this operation
at once cause no more an error!

We tried different mdac version, and searched the web for an solution
but all solutions we found are for problems where this error is
justifiable.

Thanks for any hint!

Peter Slovacek
Val Mazur (MVP) - 18 Feb 2006 02:07 GMT
Hi,

Check next link about potential causes for this error

http://support.microsoft.com/kb/328306/en-us

Signature

Val Mazur
Microsoft MVP
http://xport.mvps.org

> Hello dear Newsgroup!
>
[quoted text clipped - 31 lines]
>
> Peter Slovacek
slovi@gmx.de - 20 Feb 2006 08:39 GMT
Val Mazur (MVP) schrieb:

> Hi,
>
> Check next link about potential causes for this error
>
> http://support.microsoft.com/kb/328306/en-us

Hi Val,

thx for the answer. We already find this Microsoft Error Description.

The problem is that the error is not caused by errorenous connection
data or by hardware problems. There are no problems under Win2000, but
we got this error spradic and only for an milisecond. after resume it
works.
MarCoL2005 - 20 Feb 2006 19:49 GMT
Hi Peter,

I have also the same problem. Also i haven't solved this problem and i
have searched for this problem for a couple of months. I have read one
thread maybe this can solve your issue, you can try this
http://support.microsoft.com/default.aspx?scid=kb;en-us;328476. This
solves your problem if you are opening 4000+ connections. It doesn't
solved my problem. I have also the problem that i'm getting DBNETLIB
SQL server does not exist or access denied messages randomly. When i'm
firing 700 queries it goes down, it works very well on Windows 2000 but
with 2003 i'm getting this stupid messages. I think nobody has solved
this. . .

What is your oppinion and does the link solved your problem?

Marco
Marcol2005@yahoo.com
slovi@gmx.de - 22 Feb 2006 09:39 GMT
it seems we have the same problem. our application does a couple of
hundred ado operations at once too.

we found a workarround as we changed the connection string from oledb
to an odbc connection type.
Frank Lehmann - 23 Feb 2006 12:03 GMT
Hi all, who encounter the "does not exist / access denied" error,

I repeat my post here that I had already contributed a year ago:

The connection may have got lost because the client machine opens
a new TCP port with every access to the SQL Server without
re-using the connections/ports previously opened. (TCP port is not
equivalent to SQL Server connection.)

You can watch this behaviour with the netstat service program run in a
DOS window. Connections not being re-used get into the TIME_WAIT state
and will be automatically deleted/released after 4 minutes, unless the TCP
settings are re-configured.

According to how frequently an application accesses the server, it might
happen that you get thousands of TIME_WAIT connections in a relatively short
period of time, until the resources are dead.

This error occurs sporadically, depending on how much TCP ports
are open/released again on the client machine at a given moment.
It results in errors like
[DBNETLIB]SQL server does not exist or access denied
[DBNETLIB]General network error, and a few others.

To mitigate this, you could introduce a second ADO.Connection in
critical places, so that connection pooling works or rather works at all.
Critical place is, for instance, if you open a recordset and before closing
it, you open a second recordset via the same ADO.Connection. Take a
different one. (This is my standard reply, and it may not apply to your
specific application.)
By this measure, I was able to reduce the number of open TCP ports
from 1000 to 3 in my application.

Other measures are Registry TCP settings (That may apply to your app):
MaxUserPort:
Increase the number of TCP ports to allow more open ports.

TcpTimedWaitDelay:
Decrease the number of seconds, until a TCP port is released (down to 30).

in
HKLM\System\ControlSet\Services\Tcpip\Parameters

I've read somewhere that this behavior of lots of TCP connections
not being reused came into Windows out of security reasons
in order to prevent that hackers gain access to a server through such
an open channel without authentification.

-------
Frank
MarCoL2005 - 28 Feb 2006 08:52 GMT
Is there any other idea what can cause the "does not exist / access
denied" error. It appears sometimes and not everytime. When firing +/-
700 queries.

Any idea is appreciated.

TIA,
Marco

Frank Lehmann schreef:

> Hi all, who encounter the "does not exist / access denied" error,
>
[quoted text clipped - 46 lines]
> -------
> Frank
Frank Lehmann - 28 Feb 2006 14:52 GMT
Hi Marco,

Did you check all the issues I stated in my post?
What were the results of those checks - give a little feedback first.

- Do you have several open recordsets via the same ADO connection in
 your app?

- Did you alter the TCP/IP settings in the registry?

Regards,
Frank

> Is there any other idea what can cause the "does not exist / access
> denied" error. It appears sometimes and not everytime. When firing +/-
[quoted text clipped - 57 lines]
> > -------
> > Frank
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.