A quick one to signal boost this issue and its solution, as I'm sure other people will run into it. If you're on Standard Edition of SQL Server and upgrading to 2017, you might run into an issue where the database services portion of the upgrade fails. This seems to be related to SSIS.
If you experience this problem, mid-way through the upgrade you'll receive this error in a pop-up:
Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
At the end of the upgrade, it will show that the database services section has failed. Checking the error log will show this:
Script level upgrade for database 'master' failed because upgrade step 'ISServer_upgrade.sql' encountered error 917, state 1, severity 15.
This discussion of the issue sheds some more light on it; in short, something in one of the DLLs used by the upgrade attempts to build an index using
(ONLINE=ON), which works fine on Developer or Enterprise edition, but not Standard. This isn't great news if your dev/test servers are Developer edition, as even if you've tested this upgrade first, you'll still be caught out.
The fix given in that same discussion is as follows:
- Start SQL Server using trace flag 902 to prevent the upgrade scripts from running
- Upgrade to the latest CU
- Restart SQL Server without the trace flag
While I could successfully start SQL Server after carrying out the above, the 2017 version of the SQL Server Agent service hadn't been created. The executable existed, but no service showed in SQL Server Configuration Manager, and checking Services showed the 2016 version, which no longer existed.
Repairing SQL Server using the 2017 installation media fixed this final issue for me.