External Database Authentication

External Database Authentication

by Steen Pedersen -
Number of replies: 2

Hi

I am currently configuring an External Database Authentication to a Microsoft SQL Server. I have configured the necessary fields in the external database settings. When I afterwards test the connection I get the following error:

errors: Array ( [0] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 10054 [code] => 10054 [2] => [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x2746 [message] => [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x2746 ) [1] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 10054 [code] => 10054 [2] => [Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection [message]

I have checked the name of the view, username and password and I can telnet form our Moodle server to the Microsoft SQL server on port 1433 TCP so firewall should also be okay. 

I have checked the Error code 0x2746 and it seems that the problem could be the TLS version on the SQL server. This is an old Microsoft 2003 server with SQL 2005 SP2 server so it does not support TLS 1.2.

I have configured External Database Authentication on several servers and this is the first time it fails.

Our Moodle server is installed on Debian 10 and the Moodle version is 3.10+ 

Is this an error you have seen before? Is there any other solution than moving the database to a newer Microsoft server and SQL version?

Best Regards

Steen Pedersen

Average of ratings: -
In reply to Steen Pedersen

Re: External Database Authentication

by Bret Miller -
Picture of Particularly helpful Moodlers
I've seen lots of TLS errors with older versions of SQL Server. If you have the option, you might try installing the MySQL odbc driver on the SQL Server server and push the tables you need from there to the Moodle server so you don't need to try to access an ancient SQL Server from a modern Debian server.

For ours, I set up an hourly job to sync the information from SQL Server to the Moodle server because I don't want to allow inbound connections from the internet to our SQL Server even if it is Windows Server 2019 running SQL Server 2019.

Another option would be to set up SQL Express instance on another computer and use an external server to pass the requests through so you can downgrade the TLS on that server to a version the old server will handle. Honestly though, using Windows Server 2003 + SQL Server 2005 is just asking to be hacked. It's way past time to upgrade.
In reply to Bret Miller

Ang: Re: External Database Authentication

by Steen Pedersen -
Hi Bret

Thank You for your answer. I am in the process of moving all databases and integrations from our old Microsoft SQL environment to new servers (windows 2019). So in a couple of weeks I can remove the old servers and the problem should be solved.

Best Regards
Steen Pedersen