Moodle support of MSSQL 2019

Moodle support of MSSQL 2019

by Roman Markin -
Number of replies: 17

Hello everybody,

We choose the best version of MSSQL for a large scale Moodle installation. According to the Moodle 3.9 release notes (https://docs.moodle.org/dev/Moodle_3.9_release_notes) the recommended MSSQL version is the latest. 

Are there any practical reasons to prefer older MSSQL 2017 to the newest 2019?

I would also appreciate confirmation that Moodle 3.9 performs well on MSSQL 2019 in production environments with 1000+ online users.

Thanks,
--Roman


Average of ratings: -
In reply to Roman Markin

Re: Moodle support of MSSQL 2019

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I hope I'm proved wrong but I think you'll find that the number of MSSQL users in these forums is very small. If you want to maximise support availability then MySQL is the way to go.
In reply to Howard Miller

Re: Moodle support of MSSQL 2019

by Roman Markin -

Hi Howard, 

Thanks for the answer. I totally agree with you, but choosing MSSQL is a requirement that we can't overcome.

--Roman

In reply to Roman Markin

Re: Moodle support of MSSQL 2019

by Matt T -
I must say, the whole 'you must use this particular database server' thing has always baffled me. I assume a superordinate has directed you as such. You're not the first to post here about it. I've seen posters who say they absolutely must use Oracle databases.

Do you mind if I ask why? I have never worked for a company which imposes such a condition. It's very strange to me. Is it because you have a support contract with Microsoft, or a database administrator who is only familiar with MSSQL?

The difficulty I have is that logically you might say that your organisation has effectively ruled out ever using software that does not support MSSQL as a database backend, of which there is a lot. Moodle might technically support it as a backend, but for a production site, particularly a large one, it's a bad idea in my view.

Just bear in mind that the database administrator or Microsoft support contract will probably be useless for troubleshooting database issues caused by or pertaining to Moodle.
Average of ratings:Useful (1)
In reply to Matt T

Re: Moodle support of MSSQL 2019

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Or, one can turn the table: If the said institution "must", it shall bring the resources to employ a team of MSSQL developers to repair whatever deficiencies Moodle-MSSQL interface now has and maintain the new product for the others in the spirit of Open Source. The top boss of MS sings his love of Open Source nowadays. (The oldies know different times, when there was a Gorilla at the helm.)
In reply to Visvanath Ratnaweera

Re: Moodle support of MSSQL 2019

by Matt T -
Microsoft (and Apple, and Google) pretty much all now embrace the concept of 'use what is best for the job'. They do not require you to use their own software just simply for the sake of it.

I'm afraid that's not the case with OP's organisation.
In reply to Matt T

Re: Moodle support of MSSQL 2019

by Roman Markin -
Hi Matt and Visvanath,

Thank you for your responses. So that they do not go unanswered on my part, I will add that I fully share your point of view. Moreover, I can say that I had the sad experience of running Moodle in a production environment on Oracle over 7 years ago, and it was painful. Oracle DBAs did not address these issues, and the entire responsibility lay with the development team. After some time, when the internal customer got tired of the problems, the IT department approved the move to MySQL, and in the end the customer was satisfied.

In the current situation, our choice of DBMS is limited to Oracle and MSSQL, and the latter seems less problematic for Moodle. The limitation comes from the set of technologies supported by the organization. Any new technology requires new knowledge (hired specialists). That's just to clarify how we arrived at this point.

Thanks,
--Roman
Average of ratings:Useful (1)
In reply to Matt T

Re: Moodle support of MSSQL 2019

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I think it's quite common. You're assuming a world where one person or a small team is responsible for Moodle. I'm in a situation where I am the Moodle "expert" (laugh now!!) but the actual servers are supported by a dedicated team. They provide and support (in this case) Enterprise MySQL. They would not support PostgreSQL because none of them know anything about it (and have no motivation to learn). This is just big organisations for you. We get excellent MySQL support by the way (just in case one of them reads this) big grin

Having said all that I keep coming back to - if you know what's good for you, use what everybody else uses. 
Average of ratings:Useful (1)
In reply to Howard Miller

Re: Moodle support of MSSQL 2019

by Matt T -

That wasn't really the world I was assuming, given OP said 1000+ online users. It may be that I am naive: at most, I managed full stack for an install of a few thousand students.

There are types of software I have come across (eg student management systems) where you do need to have a full time DBA who is an expert on the system. I didn't really think of Moodle falling in that category of software, until you hit the point where clustering is necessary.

If OP is not comfortable managing allowed to manage a MariaDB/PostgreSQL database server, another option would be to use a cloud service like Amazon RDS where management is done for you. Providing it's approved, of course. : )

In reply to Matt T

Re: Moodle support of MSSQL 2019

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I'm sure we all know of places that are totally in the grip of Microsoft. The OP probably had a hard time getting to use Moodle at all. "Why can't we just use Teams?"
Average of ratings:Useful (1)
In reply to Howard Miller

Re: Moodle support of MSSQL 2019

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
"Why can't we just use Teams?" Hilarious!

No, it is not funny at all. That is exactly what the German state of Baden-Württemberg (capital Stuttgart) is up to: Baden-Württemberg: Microsoft 365 an Schulen? (In German, guess it is in the press.)

Generally this side of the Atlantic is invaded by Microsoft, Google reins the other side.
sad

In reply to Visvanath Ratnaweera

Re: Moodle support of MSSQL 2019

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I used to work in that part of the world (Böblingen to be exact) but that was before Microsoft was invented. I'm showing my advanced age now big grin
In reply to Matt T

Re: Moodle support of MSSQL 2019

by Luis de Vasconcelos -
Picture of Particularly helpful Moodlers
Why is it a bad idea?
We're still using Microsoft SQL Server 2016, so I haven't tested MSSQL 2019... but our Moodle has been running fine on MSSQL for 10 years - with 901 courses and 45000+ active students, about 500 of them logging in per day.
In reply to Luis de Vasconcelos

Re: Moodle support of MSSQL 2019

by Matt T -
Because you're better off using a database used by the overwhelming majority of Moodle users which gets the most attention from the developers, particularly with a large install. If you have a MSSQL administrator who is competent enough to be able to resolve issues that might arise, or you have a support contract with a Moodle partner who is aware of your situation, then you mitigate the risk. If you're relying on issues being fixed upstream, best stick with a more popular database.

I can't help but think most MSSQL DBAs never would have dealt with PHP code before...
In reply to Roman Markin

Re: Moodle support of MSSQL 2019

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Echoing what Howard says, the majority of support on these forums is for MySQL/MariaDB because that's what the majority of Moodle sites use. That's not to say that Moodle with SQL Server doesn't work well, just that you would need to be in a position to support this, either in-house or using an external supplier who has experience of this.

This thread may be useful.

In reply to Leon Stringer

Re: Moodle support of MSSQL 2019

by Matt T -
I'm curious to know to what extent a Microsoft SQL Server DBA is going to be able to fix issues relating to Moodle. Performance issues - yes, for sure, by scaling up and configuring to best practices. Managing backups - yes (although, I'm a big fan of good old fashion dumps, taken precisely at the same time as code and data directory). But - say that a change to Moodle core code adversely affects MSSQL installs - not a whole lot that can be done in that case (I think).
In reply to Matt T

Re: Moodle support of MSSQL 2019

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

You're thinking logically, you've got to think like a middle-manager: little technical knowledge ("I have ten years' experience" == one years' experience nine years out of date), keeping your job safe and making absolutely no decisions that could lead to having to take any responsibility. In an organisation with a conservative adherence to Microsoft software, if you implement a system on MySQL/MariaDB and there's a glitch then fingers could be pointed: you were wrong to choose this other system. But if you implement it on SQL Server and the entire system became unusable, at least you made no decisions that could lay the blame at your door. And DBAs may be resistant to learning about different DBMSes (I have some sympathy with this). There are so many organisations with this kind of culture.

But, although we may frown at proprietary software, SQL Server does its job well and is widely used. So it's great that Moodle supports it. But this does require in-house willingness to support Moodle on SQL Server, rather than rely on these forums where most use MySQL/MariaDB. And if you can't do it, find someone with the skills and engage them. I get frustrated because SQL Server issues get posted here (an issue with backups in the post I linked to above and MDL-34744 which caused me a lot of headaches) but if we can't reproduce the issues then we can't assist.

But, yes, ideally Moodle on SQL Server needs to be supported by people capable of going from the Moodle source code, through the PHP drivers, to the SQL Server connection, and database itself. That's what I was trying to say in my first reply. And, yes, organisations that mandate specific platforms for what ever reasons don't necessarily consider this.

(I've rambled a bit I hope this is at least somewhat constructive).

Average of ratings:Useful (2)
In reply to Leon Stringer

Re: Moodle support of MSSQL 2019

by Matt T -
Constructive indeed. I'm not inherently opposed to proprietary software. What I'm opposed to is using an inferior option for dodgy (generally business) reasons. 

I've used SQL Server before, and I thought it was really good (particularly VSS for backups). The last time I used it, it was for an application that supported MSSQL and Oracle backends. While the vendor *strongly* recommended MSSQL, mostly because the overwhelming majority of their supported customers used it, they had to keep an Oracle option open - and it was precisely because of the reason you've identified. 

Anyway, I'm digressing. To OP - If you have no other option, for 1000 concurrent users I would consider getting a Moodle partner onboard. You could either have them host the whole thing for you, or alternatively, at least find one who may be prepared to help you support an install on MSSQL.

https://moodle.com/partners/