SCOM SQL Error 18054

A while back we moved an OperationsManager database from one SQL server to another. While investigating something we saw this event in the application event log on the SQL server:
Log name: Application
Event ID: 18054
Description: Error 777980004, severity 16, state 1 was raised, but message with that error number was found in sys.messages. If error is larger than 5000, make sure the user-defined message is added using sp_addmessage.
Screenshot of the same event here:

This is because of the move of that database to another server. The SCOM specific messages are not yet present on the new SQL server. In order to add this one and more like these (the 777980004 and alike) we need to run a SQL script that inserts the error descriptions of these into the system.
You can find the script here to fix those error messages:
Just run that script against the master database.
Bob Cornelissen