Oct 20 2023 05:21 AM
I am having issues connecting to a database located on a SQL Server 2022.
When creating the connection all test gives OK. But when trying to connect, it fails with:
ODBC--call failed
"Query timeout expired"
If I don't define the database, then Access connects to master db and lists the tables that I can access. So it seems the connection to the server itself is ok.
Tried ODBC SQL server driver, SQL Server 17 and 18 odbc driver, all same results.
Same database on SQL Server 2014 also does not work for my user, but another user has previously been able to connect to old database, but seems something is missing either client-side or server option in the new setup?
Oct 20 2023 05:39 AM
Oct 20 2023 08:08 AM
Oct 21 2023 09:38 AM
@Tom_van_Stiphout @George_Hepworth credentials work great with SSMS, all tables are visible - still not with ODBC.
Oct 21 2023 10:26 AM
Oct 22 2023 11:04 PM
Oct 23 2023 05:07 AM
I don't recall. Did you ask the DBA for this SQL Server for assistance? In fact, we ought to be clear on where this SQL Server is located, local or remotely hosted.
One other thing comes to mind, which I probably should have thought of previously. Depending on where this SQL Server is, local or hosted, it may be that you have to specify that the connection needs to trust the Server Certificate to which it's connecting.
Note the elements of this connection string for a table linked in Access, for example, especially the last one.
DRIVER=ODBC Driver 18 for SQL Server; SERVER=YourServerNameGoesHere;UID=YourUserIDGoesHere;PWD=YourPasswordGoesHere;Trusted_Connection=No;APP=LocalApplicationName;DATABASE=YourSSDatabaseNameGoesHere;Encrypt=Yes;TrustServerCertificate=Yes;
TrustServerCertificate is being required by more hosts, as well as by SQL Azure. I have been caught out by it at least a couple of times in the last 6 months.
Oct 24 2023 12:24 AM
Oct 24 2023 07:00 AM