|
Posted by Erland Sommarskog on 01/26/06 01:00
kwdavids (kevin@davnet.org) writes:
> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
> access denied
>
> I get the error both in application code and from Enterprise Manager.
> The database is LOCAL.
>
> Microsoft SQL Server 2000 Developer Edition SP4
> Windows XP Professional SP2
>
> My application essentially reads one row from one table, reads some
> additional rows from the another table in the same local database, and
> then writes one row into another table in another local database (and
> commits the transaction). The application process approximately 3932
> input records, then the read for the additional rows fails with the
> error above. With identical input data sometimes it will fail after
> 3931 rows, sometimes 3932, sometimes 3933. Once it fails, it will fail
> for the next 5-6 input rows, and then start working for a few thousand
> rows more, then error again.
>
> Note that the application should not actually connect to the database
> when I get this error, it's just opening a dataset on an already-open
> connection.
Or at least so you like to think.
What I have seen is that there are some ways to get shared memory to become
sour. And shared memory is usually what you use for connection on a local
server.
One way is to open QA, stop SQL Server and restart. You can now notice
that opening new windows or starting OSQL takes a long time.
The other way I have encountered this was when I ran a script that for
test purposes connected and disconnected in a tight loop - and I had
turned off conncetion pooling for the test.
Connection Pooling is usually on in ADO .Net, but if you are not handling
your connections correctly, then the pool will dry out. But that usually
leads to an error message from ADO .Net before you wreck shared memory.
You would try opening the SQL Server Client Utility and an uncheck
shared memory, to see what effect this gives.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
[Back to original message]
|