error code 3417 - after installing CU for SQL SERVER 2016 SP1 I am getting below error message after installing cumulative updates for SQL Server 2016 Sp1.


  The description for Event ID 7024 from source Service Control Manager
  cannot be found. Either the component that raises this event is not
  installed on your local computer or the installation is corrupted. You
  can install or repair the component on the local computer.
  
  If the event originated on another computer, the display information
  had to be saved with the event.
  
  The following information was included with the event: 
  
  SQL Server (MY_INSTANCE_DEVELOPMENT) %%3417
  
  The locale specific resource for the desired message is not present


I have 2 instances on that server, 
DBA16 AND DEVELOPMENT.

DBA16 started up nicely and no problem, but DEVELOPMENT is not starting.

I tried to start the service manually and get the same problem.

I have applied these same updates on several servers, including clustered ones, with alwaysOn and replication, and had no problems.

Replication distributor also worked fine.

This server in particular, I could find no reason for these problems.

I might have to re-install sql server or rebuild the instance, if it is related to corruption in some file, or the master database.

is there anything I should be aware of or might have not looked\considered?





There is a similar question here: Start service error code 3417 with SQL Server 2012

Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 15173, state 1, severity 16. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.
I have started the sql server service from the command line using the trace flag /T902

FROM TRACE FLAGS

902 

Bypasses execution of database upgrade script when installing a Cumulative Update or Service Pack. If you encounter an error during script upgrade mode, it is recommended to contact Microsoft SQL Customer Service and Support (CSS) for further guidance. For more information, see this Microsoft Support article.

WARNING: This trace flag is meant for troubleshooting of failed updates during script upgrade mode, and it is not supported to run it continuously in a production environment. Database upgrade scripts needs to execute successfully for a complete install of Cumulative Updates and Service Packs. Not doing so can cause unexpected issues with your SQL Server instance.

Scope: global only



this is also a good link:
Use Trace Flag 902 to Recover from a Cumulative Update Failure

After that I have looked at my error and it was about applying an update script.



I manually open that file and run it from management studio:

and the real error is:

Msg 15173, Level 16, State 1, Line 63894
Server principal '##MS_AgentSigningCertificate##' has granted one or more permission(s). Revoke the permission(s) before dropping the server principal.
Msg 208, Level 16, State 1, Line 63932
Invalid object name 'dbo.sysssispackagefolders'.



Here is another wonderful contribution by Pinal Dave on the subject:

SQL SERVER – Script level upgrade for database master failed because upgrade step sqlagent100_msdb_upgrade.sql

I have just seen this one:

Failure during install of SQL Server 2016 sp2

after sorting this out,
I will start the sql service again, without the trace flag 902.