SQL2012 upgrade SP2 installation failed, service could not start, error message is as follows:
-------------------------------------------------------
error:912, severity:21, State:2.
Script level upgrade for database ' master ' failed because upgrade step ' Msdb110_upgrade.sql ' encountered error 3930, State 1, severity 16. This was a serious errorcondition which might interfere with regular operation and the database would betaken offline. If the error happened during upgrade of the ' master ' Database,it would prevent the entire SQL Server instance from starting . Examine theprevious errorlog entries for errors, take the appropriate corrective Actionsand re-start the database so The script upgrade steps run to completion.
-------------------------------------------------------
View error log records and intercept from the wrong place :
-------------------------------------------------------
2014-12-18 09:57:24.15 spid5s Could not open database [System]. Replication Settingsand system objects could not be upgraded. If the database is used forreplication, run sp_vupgrade_replication in the [master] database when Thedatabase is available .
2014-12-18 09:57:24.21 spid5s Upgrading subscription Settings Andsystem objects in database [Air3_base].
2014-12-18 09:57:24.35 spid5s Index cannot be created on object ' MSreplication_subscriptions ' because the object I s not a user table or view.
2014-12-18 09:57:24.35 spid5s Error executing sp_vupgrade_replication.
2014-12-18 09:57:24.35 spid5s Saving upgrade script status to ' Software\microsoft\mssqlserver\replication\setup '.
2014-12-18 09:57:24.35 spid5s Saved Upgrade script status successfully.
2014-12-18 09:57:24.35 spid5s Database ' master ' is upgrading script ' Upgrade_ucp_cmdw_discovery.sql ' from level 184551 476 to Level 184554434.
2014-12-18 09:57:24.81 spid5s Database ' master ' is upgrading script ' Msdb110_upgrade.sql ' from level 184551476 to Leve L 184554434.
-------------------------------------------------------
Could not open database [System] in order to prevent the database service from restarting SMS alerts , offline the library before patching . After attempting online , the upgrade is still not successful and the error is not fatal.
Keep trying.
MSreplication_subscriptions The object is a system table created for replication, in the instance find the object and discover a synonym for the partial subscription inventory in the system table, and the synonyms script for all replication related system tables is as follows:
Use [XX]
GO
/******OBJECT:SYNONYM[DBO]. [MSreplication_objects] SCRIPTDATE:2014/12/18 11:01:06 ******/
CREATE synonym [dbo]. [MSreplication_objects] for [YY] . [dbo] . [MSreplication_objects]
GO
/******OBJECT:SYNONYM[DBO]. [MSreplication_subscriptions] Script DATE:2014/12/18 11:01:06 ******/
CREATE synonym [dbo]. [MSreplication_subscriptions] for [YY] . [dbo] . [MSreplication_subscriptions]
GO
/******OBJECT:SYNONYM[DBO]. [MSsnapshotdeliveryprogress] Script DATE:2014/12/18 11:01:06 ******/
CREATE synonym [dbo]. [MSsnapshotdeliveryprogress] for [YY] . [dbo] . [MSsnapshotdeliveryprogress]
GO
/******OBJECT:SYNONYM[DBO]. [MSsubscription_agents] SCRIPTDATE:2014/12/18 11:01:06 ******/
CREATE synonym [dbo]. [MSsubscription_agents] for [YY] . [dbo] . [MSsubscription_agents]
GO
After you remove these synonyms, upgrade SP2 success.
as described in the error log, the reason should be: The database is in the upgrade SP2 These synonyms to the system table, creating an index failure for these synonyms causes the SP2 upgrade to fail.
Workaround: Delete these synonyms created for the system tables, and then create them back after the upgrade is successful.
Summary: This kind of error occurs, the first time to look at the error log , according to the error of one of the resolution, do not be misled by error messages.
This article is from the "Yang Jinxiang" blog, make sure to keep this source http://jpstar.blog.51cto.com/5493713/1591304
SQL2012 Upgrade SP2 Failure-Error 3930 workaround