1

Currently, I have two separate SQL Server instances that I am querying using pass-through SQL queries via a form in Microsoft Access.

The queries to SERVER1 work every time without fail. I'd say about 80% of the time the queries to SERVER2 don't work after Access has been closed and re-opened until I go in and "modify" the OBDC connection string and save the query. I have quotes around modify because if I edit one character in the string and re-add it and then save, it usually starts to work again (but not always), even though the string hasn't changed. And once it works it will continue to work until once again Access is closed.

It's usually one of three errors, here are two of them and the third error which I get less frequently is that the login is incorrect:

Error 1

Error 2

The OBDC connection string is as follows (for what it's worth I also tried ODBC Driver 17 for SQL Server and got the same results):

ODBC;Description=SERVER2 PASSTHROUGH;DRIVER=ODBC Driver 11 for SQL Server;SERVER=SERVER2;UID=Test;PWD=Password;DATABASE=MyDB;LANGUAGE=us_english;ApplicationIntent=READONLY;

How do I go about solving this problem? Also, I am willing to provide any clarifying information.

Thanks!

jh2399
  • 47
  • 4
  • This may be of help: https://stackoverflow.com/questions/8984801/sqlcmd-unable-to-complete-login-process-due-to-delay-in-opening-server-connectio – Alex Jan 20 '22 at 02:17

1 Answers1

0

Thanks to Alex for the reply.

Alex recommended going to SQLCMD Unable to complete login process due to delay in opening server connection. I should have been more scientific but I used a shotgun approach... I set my shared memory to disabled, as well as increased the connection timeout and command timeouts.

This then produced a new error for me similar to the one here No process is on the other end of the pipe (SQL Server 2012).

As many of the comments suggested, my SQL server was set to SQL Server and Windows Authentication mode, I changed it to Windows Authentication mode, and then back to SQL Server and Windows Authentication mode, and restarted my SQL server.

And for now, my problem has not shown up through multiple MS Access restarts and a few PC restarts as well for good measure. Fingers crossed.

jh2399
  • 47
  • 4