Upgrade Moodle to 4.3 got error

Re: Upgrade Moodle to 4.3 got error

by Whalon Herbert -
Number of replies: 0
Hi Mark -- I am facing similar situation with this same collation issue (SQL_Latin1_General_CP1_CI_AS) in a windows server, SQL server environment. Feedback from my DBA and supported/reported by other Moodlers is there is/was a code issue....

OP David Collins references where the issue lies...in the file (sqlsrv_native_moodle_database.php) sql_like method.

I am just sharing what I did to troubleshoot, as i found at least 2 other cases of this same issue being posted. as of the current MOODLE_STABLE_403 build)

Using this post by David Collins, I tried to first set the line $this->collation = 'SQL_Latin1_General_CP1_CI_AS'; as my DBA informed me the expected collation coming from the upgrade file was not valid. I was not able to replicate the same success the OP did, as I am now facing the error "Setting up of database session failed. Please notify the server administrator." This is on my test site, so I will attempt again from a new restore, or fiddle with the broken instance some more....or both 🤓.

I'm just wondering if anyone has positive feedback on the workarounds posted (updating config.php or manipulating sqlsrv_native_moodle_database.php) , or if we are thinking this will work out in a future MOODLE_403_STABLE build?

The attachment shows the sql_equal method, which has similar string replacement statements to the sql_like method below, again, it makes sense only b/c the OP laid it out so nicely.
Attachment collation_issue_4.3.png