VSS: SQL Server does not exist or access denied

VSS: SQL Server does not exist or access denied

Rate This
  • Comments 74

I recently worked on three customer issues. In all those cases, customers were not able to backup databases using Microsoft Volume Shadow Copy Service (VSS). MSDEWriter does not show up with “vssadmin list writers”. And VSS logs the following error message in event log:


Sqllib error: OLEDB Error encountered calling IDBInitialize::Initialize. hr = 0x80004005. SQLSTATE: 08001, Native Error: 17
Error state: 1, Severity: 16
Source: Microsoft OLE DB Provider for SQL Server
Error message: [DBNETLIB]SQL Server does not exist or access denied.


MSDEWriter uses MDAC SQLOLEDB to make connections to all SQL instances installed on a machine. VSS finds SQL server instances and the instance names by enumrating running SQL server services on the box. It uses the default protocol to connect the servers. In order for MSDEWriter to work correctly, it must be able to connect all SQL server instances of interests. That is, if you have 5 instances and fail to connect to only one of the instances, MSDEWriter will not work. MSDEWriter only works with local instances. We can ignore any possible firewall issue as this is local connection.


In the first case, client shared memory protocol is disabled by the customre unexpectedly. One of the SQL instances installed on the customer machine is WMSDE. As we know, WMSDE can only listen on shared memory protocol. Clients can only connect to a WMSDE instance using shared memory, which is disabled in the customer's box. Enabling the shared memory protocol using SQL Server Client Network Utility fixes this problem.


The second case was due to an outdated alias. The customer had an alias defined previously but forgot to remove it when configuration changes. This alias forces connections to one of the instances to use TCP protocol. However, at some point, the customer disabled TCP protocol for the SQL server instance. This is also an example which tells us that users should use alias with caution, although alias can provide convenience and could be a useful workaround when user faces some specific problems.  


The third case is a surprise to us. We eventually found out that our sqloledb.dll is not loaded. A third party OLEDB provider took over the role of Microsoft SQLOLEDB provider. Like SQLOLEDB provider, the third party provider also calls DBNETLIB APIs. However, this provider does not behave the same way as Microsoft SQLOLEDB and passes different connection string to DBNETLIB. This breaks our product integrity and causes the problem. The problem is fixed by replacing the value of the following keys:


C:\Program Files\Common Files\System\Ole DB\sqloledb.dll.


So, if you recently installed any third party database product, you may also want to check this registry when you have similar connectivity issues. We don’t expect any third party product changes our registry value.


Xinwei Hong, SQL Server Protocols
Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights

Leave a Comment
  • Please add 5 and 1 and type the answer here:
  • Post
  • I found you explenation very interesting although have some further question regarding this particular error message, I ran myself into issue where .net application on IIS 6 is talking to SQL2k by mean of connection string in web.config file user can authenticate, navigate read/write run reports from within application, but one feature does not work, when user request report export which should create report in word doc format in temp folder on iis connection is denied, user get exactly same error "sql does not exist or access denied" it's not code issue because this work on many sites besides one, it's not iis secirity issue, do you have any sugestion what to look for?

  • My blog was talking about local connectivity issue for MDAC/SQL Server.
    The error, "sql does not exist or access denied", is very generic and our whole blog is trying to solve this or related problems.

    You can learn more by reading our blogs, especially this one:

    Generally, if your code works well on machines but one specific machine, it's protocol/network configuration issue. You may want to check the follows:
    1) is the protocol you use enabled on the sql server?
    2) enable/disable firewall to see the difference if this is a remote connectivity issue.
    3) If sql server 2005 is also installed, you will want to check whether sql browser is running or not, especially for named sql instance.

    We'd like to look it in further if you can provide more info I have mentioned, as well as your connection string.

  • I'm having a similar problem, except it's sporadic. I'm running a DTS package that does mass inserts from several tables on one server, and sends the data to a different server. Both are running SQL Server 2000. About 5% of the time, it will copy some (most?) of the data, and then get the error.

    Both servers are running in the same domain.

    I get this error:

    ERROR REPORTED: Datamart Upload failed. Step "DTSStep_DTSDataPumpTask_2" Failed
    Error: -2147213206
    Source: Microsoft Data Transformation Services (DTS) Data Pump
    Description: The number of failing rows exceeds the maximum specified. (Microsoft Data Transformation Services (DTS) Data Pump (80020101): Error Code: 0
    Error Source= Microsoft OLE DB Provider for SQL Server
    Error Description: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

    Error on Line 6
    ) (Microsoft OLE DB Provider for SQL Server (80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.)

    In this example, I copied over many, many records (over 10,000), and then it finally indicated the server doesn't exist. Hmmm. It didn't have any problems a millisecond ago.

    I have no idea how to solve this when it's sporadic.
  • i am having exaltly the same problem for over two months now. does anybody have an answer that works
  • If you are running into a mid-stream connectivity failure, this is very different than basic connectivity failure.  Think of it this way, when any application opens a socket and starts reading and writing on it, it should not disconnect in the middle of the conversation, this should be very rare in your network environment.

    So if you do see these mid-stream failures "intermittently", this typically points to network infrastructure issues.

    Here is how I typically attack these.  

    1. Start with SQL Profiler traces on the server side and make sure you capture all errors in the profiler trace.  Certain SQL errors can be fatal to the connection, if you see any errors around the time of the failure, you should track these down and figure out how to avoid them.

    2. If SQL Profiler is clean, next step is enable 3689 and 4029 trace flags, these will push more verbose errors to the errorlog when read+write errors occur in the network layer on the server side.

     dbcc traceon(4029,-1)
     dbcc traceon(3689,-1)

    So keep track of when the failures occur and then go look at SQL's errorlog for logging around the same timeframe from these trace flags.  The trace will dump out the socket error code this can sometimes give you a clue as to the root cause.

    3. Another way to further troubleshoot these is gathering netmon traces on both client and server and then comparing the traces, but this requires some networking expertise.

    In general when you start seeing mid-stream failures you need to get your networking people involved and diagnose the network path from client all the way to server.  Do things like replace the NICs on the SQL box, make sure the NICs are configured properly, etc...  So you need network expertise to drill down into these in other words.

  • i am trying to connect to the database server

    and getting error SQL State 08001
    SLQ Server not found or access denied
  • Congratulations for your documentation. Help too much. Thank you!
  • The sporadic error reported by Mike (when using DTS package) seems to be universal. I too am getting it quite frequently!
    I believe the root cause is the error "The number of failing rows exceeds the maximum specified". Due to this error, the connection is being lost. Now why the above error? Don't ask me becoz i don't know!!
  • If you are using DTS and getting the "The number of failing rows exceeds the maximum specified" error please repost to the microsoft.public.sqlserver.dts newsgroup, this error is a DTS specific error message.  Most likely some fatal import or export error is occuring and this is causing the connection to be dropped, which in turn triggers the other SQL Server driver errors.

    Also look at this KB article that talks about error handling in DTS ->

    Error Handling in DTS:
  • "re: VSS: SQL Server does not exist or access denied"

    You guys don't make it simple for the novice!! Could you make a step by step explanation.
  • Sorry, but this blog does not intend to solve all VSS issues. It's just my experience which may be helpful for you when you troubleshoot your vss connectivity issues. If you want to see introduction for VSS, please check here:

  • i am getting the error

    [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or acess denied

    when i am running my application after i installed MS sql server 2000 on the administrator machine with admin login..

    Please help..

  • ConnectionOpen(Connect) means that the client cannot open a socket to the SQL Server.  If this is a default instance of SQL Server running on port 1433, then most likely the root cause is port 1433 is blocked by your firewall.  The easiest way to unblock SQL Server from firewall is to go to the Windows Firewall utility in Control Panel and go to the Exceptions tab and click the "Add Program..." button and add sqlservr.exe.

    If you are connecting to a non-default instance, then it could be that you also need to add the SQL Browser service to the Windows Firewall exception list as well (sqlbrowser.exe).

    To verify if it is firewall issue, determine the port that SQL is listening on and from the remote machine try to telnet to this port:

      telnet mymachine 1433

    If this fails, then it is firewall issue.

  • I don't know if this may, or may not help anyone, but i've had loads of problems with one MSDE machine, and not on others.

    I did the usual registry edits to allow mixed mode authentication, as well as adding the sa password, applied SP4... etc.

    I found the problem was that the SQL Server (MSDE) was not responding on any network protocols that I wanted to use. Don't look in client network utility, that's only any use for enterprise manager! Go to the properties of the MSDE box using Enterprise Manager, and go to the network configuration. I found that named pipes and TCP/IP were not added by default. I added them, and hey-presto! All my problems solved!

    Now all I have to do is to find a reliable way to use replication services with MSDE!

  • Guys,

    Login remotely on your server and Change sql registration to (local) instead of server name or IP. Now you can do anything DTS

    cheers !!

Page 1 of 5 (74 items) 12345