Frage

I use a Microsoft Access 2010 front end with linked tables on an SQL Server 2012 installation. Local network. When Access Starts, a VBA script runs which connects to the SQL server and performs some checks. I recently upgraded from SQL Server 2008 to 2012, that's when the connection between client and Server started to fail intermittently.

When the connection between my client and the server fails, I see a generic message "SQL Server does not exist or access denied". This is covered in a Microsoft support article http://support.microsoft.com/kb/328306. The potential causes detailed in that article do not match the trouble I am encountering.

This connection issue is intermittent. The trouble arises about 3 times a week and lasts for about 30 minutes at a time. Between these 30 minute failures, the the system works perfectly.

My Current VBA Connection String: (have tried several, trouble persists with all of them):

Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
conn.Open "Provider=SQLOLEDB;Server=Server3.companydomain.local;Database=My_Database;Trusted_Connection=Yes"

I hope that I can find something in the SQL Server Logs (which I do have access to) but I do not know which Log file to investigate.

War es hilfreich?

Lösung 2

Well it's been 7 months. Here is the solution for this problem (in my case): My secondary DNS Server was an external Server. It could not look up my database (192.168.x.x) because this is an internal address.

When My application called the Primary DNS Server to look up the SQL Server address, it worked fine. When my primary DNS was busy, and the application failed over to secondary DNS- the request would time out. There are many reasons someone may see this error. That is the reason I was seeing it.

Andere Tipps

I do not have a direct answer to your question, but I believe you could start by exploring the IP and ports on which the SQL server is listening to...Is is possible that the machine using DHCP to assign IP for the DB server as well? In this case I guess it could happen when the IPs are refreshed.

We had a similar issue where multiple IPs were getting assigned on the same machine (having multiple NIC connected) which created such intermittent disruptions.

It's a little strange, but I've found I get this error when I don't have proper "CLOSE DB CONNECTION" type code on my site. And then when too many users hit the site, I start getting this error.

Solution: Do a hard Close of DB connections, after every db call. Yes, most DB Connectors have cleanup routines, but it's not enough under heavy load.

Also, implement a high DB connection limit in the web.config

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top