none
SQL 2012 SP3 upgradation error "Error: 912, Severity: 21, State: 2.Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 226, state 6, severity 16

    Question

  • 2016-11-24 21:54:35.14 spid4s      Database 'master' is upgrading script 'upgrade_ucp_cmdw_discovery.sql' from level 184552376 to level 184555396.

    2016-11-24 21:54:35.43 spid4s      Database 'master' is upgrading script 'msdb110_upgrade.sql' from level 184552376 to level 184555396.

    2016-11-24 21:54:35.43 spid4s      ----------------------------------

    2016-11-24 21:54:35.43 spid4s      Starting execution of PRE_MSDB.SQL

    2016-11-24 21:54:35.43 spid4s      ----------------------------------

    2016-11-24 21:54:35.53 spid4s      Error: 15002, Severity: 16, State: 1.

    2016-11-24 21:54:35.53 spid4s      The procedure 'sys.sp_dbcmptlevel' cannot be executed within a transaction.

    2016-11-24 21:54:35.53 spid4s      -----------------------------------------

    2016-11-24 21:54:35.53 spid4s      Starting execution of PRE_SQLAGENT100.SQL

    2016-11-24 21:54:35.53 spid4s      -----------------------------------------

    2016-11-24 21:54:35.54 spid4s      Error: 226, Severity: 16, State: 6.

    2016-11-24 21:54:35.54 spid4s      ALTER DATABASE statement not allowed within multi-statement transaction.

    2016-11-24 21:54:35.54 spid4s      Error: 912, Severity: 21, State: 2.

    2016-11-24 21:54:35.54 spid4s      Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 226, state 6, 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.

    2016-11-24 21:54:35.54 spid4s      Error: 3417, Severity: 21, State: 3.

    2016-11-24 21:54:35.54 spid4s      Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.


    • Edited by raju mella Monday, November 28, 2016 2:47 PM
    Monday, November 28, 2016 2:44 PM

All replies

  • Hi Raju,

    Enable trace flag 902.


    Please Mark it as Answered if it answered your question OR mark it as Helpful if it help you to solve your problem.

    Monday, November 28, 2016 2:54 PM
  • I have enable the trace flag t902 ,now services running fine, but my client wants without trace the services need's to run..
    Monday, November 28, 2016 3:37 PM
  • Hi raju,

    Could you please tell us the meaning of 'but my client wants without trace the services need's to run'? My understanding is that you want to use Client to connect to SQL Server without flag t902.

    If it is, please use the following steps to cover this problem:

    1. Use trace flag t902 by using the method given from Vishe.
    2. We need to find the script ‘sqlagent100_msdb_upgrade.sql’ which caused this problem, this script should be in the folder 'C:\Program Files\Microsoft SQL Server\MSSQL11.****\MSSQL'.
    3. Run this script manually in the SQL Server Management Studio (SSMS) to find the error message and fix this problem.
    4. Stop SQL and start it normally (without flag t902).

    For more information, please review this article.

    Best Regards,
    Teige


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.




    Tuesday, November 29, 2016 2:11 AM
    Moderator