|
Home > Archive > Microsoft SQL Server forum > January 2006 > SQL Server does not exist or access denied
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
SQL Server does not exist or access denied
|
|
| kwdavids 2006-01-26, 4:57 pm |
| I'm getting occasional instances of the error:
[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.
During the time the application is getting errors (about 3 minutes
duration at a stretch), attempting to access the same local server with
Enterprise Manager gives the same "SQL Server does not exist or access
denied" error.
While things are failing, I observe that SQL Server processes are not
using any CPU (in task manager).
Things I have tried:
Disabling Norton Antivirus and Internet Worm Detection
Configuring SQL Server to use only one processor (it's a 2-Xeon
processor machine)
The only thing that seems to work is to set the connection timeout and
command timeout to 6 minutes.
| |
| Hugo Kornelis 2006-01-26, 4:57 pm |
| On 25 Jan 2006 07:59:45 -0800, kwdavids wrote:
>I'm getting occasional instances of the error:
>
>[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
>access denied
(snip)
>The only thing that seems to work is to set the connection timeout and
>command timeout to 6 minutes.
Hi kwdavids,
And I assume that this "fix" replaces your problem with the problem of
intermittend long waits?
It sounds as if a periodic process is blocking your reads, causing them
to wait until the process is finished. To identify this process:
1. Increase the timeout, as you've already tried;
2. Monitor the application until the delays start;
3. Use sp_lock and sp_who2 in a Query Analyzer window to identify the
process that is blocking your reads.
--
Hugo Kornelis, SQL Server MVP
| |
| kwdavids 2006-01-27, 11:23 am |
| Thanks Hugo,
Yes the "fix" does result in intermittent long waits.
While the application was "waiting" I ran sp_lock and sp_who2 and I
didn't see that anything was waiting for a lock. I also tried to
connect to the database from Enterprise Manager and got the Error
message (it times out pretty quick).
| |
| Hugo Kornelis 2006-01-28, 8:23 pm |
| On 27 Jan 2006 07:56:46 -0800, kwdavids wrote:
>Thanks Hugo,
>
>Yes the "fix" does result in intermittent long waits.
>
>While the application was "waiting" I ran sp_lock and sp_who2 and I
>didn't see that anything was waiting for a lock. I also tried to
>connect to the database from Enterprise Manager and got the Error
>message (it times out pretty quick).
Hi kwdavids,
In addition to Erland's suggestions - set up a profiler trace, leave it
running until you have experienced one of those 6-minute delays, then
check for irregularities. (For instance, if no events were captured at
all during that time, the problem is in the connectivity.)
--
Hugo Kornelis, SQL Server MVP
| |
| kwdavids 2006-01-30, 1:24 pm |
| For what it's worth...
It turns out that I had set up two "firehose" DataSets on the same
connection. This resulted in the 2nd connection being opened and closed
thousands of times by ADO. In my situation, SQL Server is going out to
lunch after about 6,000 connections.
Putting the second query on another connection has stopped the multiple
connections and SQL server locks up no more.
| |
| Hugo Kornelis 2006-01-30, 8:24 pm |
| On 30 Jan 2006 10:26:25 -0800, kwdavids wrote:
>For what it's worth...
>
>It turns out that I had set up two "firehose" DataSets on the same
>connection. This resulted in the 2nd connection being opened and closed
>thousands of times by ADO. In my situation, SQL Server is going out to
>lunch after about 6,000 connections.
>
>Putting the second query on another connection has stopped the multiple
>connections and SQL server locks up no more.
Hi kwdavids,
Thanks for reporting back the cause of the delays. And I'm glad to hear
that you've got this figured out!
--
Hugo Kornelis, SQL Server MVP
| |
| Erland Sommarskog 2006-01-30, 8:24 pm |
| kwdavids (kevin@davnet.org) writes:
> For what it's worth...
>
> It turns out that I had set up two "firehose" DataSets on the same
> connection. This resulted in the 2nd connection being opened and closed
> thousands of times by ADO. In my situation, SQL Server is going out to
> lunch after about 6,000 connections.
Or rather shared memory. TCP/IP connections would probably still work
if TCP/IP is enabled, as will existing connection. This was one of the
scenarios I suggested, and I been able to produce this situation myself
when running a tight loop with connection/disconnection without pooling.
(To check for memory leaks.)
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
|
|
|
|
|