Error during SQL Server 2008 R2 SP3 upgrade: MODIFY FILE failed. File 'MSDBLog' does not exist
This happens because the msdb log file name has been changed from the default which is "MSDBLog". In my case, it was called "msdb_log". The name "MSDBLog" is hard-coded into the upgrade script so it fails if the name has been changed.

To fix the problem, we need to rename the log file to 'MSDBLog'. We have to start SQL with trace flag 902 to stop it from running upgrade scripts when it starts. We can then do our fix, remove the trace flag and start it again.


Open SQL Server Configuration Manager
Navigate to "SQL Server Services" in the left-hand pane
Right click on the SQL instance and select "Properties"
Click on the "Advanced" tab
In "Startup Parameters", add ";-T902" to the end (excluding quotation marks)
Click "OK" to save it
Start the SQL instance
Rename the log file back to its original name:

ALTER DATABASE msdb MODIFY FILE (NAME=N'msdb_log', NEWNAME=N'MSDBLog')
Stop the SQL instance
Undo the changes to the startup parameters
Start the SQL instance again


The upgrade scripts will now run and should succeed.