SP2 install causing master database problem

  • Hi. I'm having a nightmare here. I applied SP2 in live this morning (following testing on an identical machine in dev, which was fine). Now SQL Server will start for a few seconds before stopping again.

    Script level upgrade for database 'master' failed because upgrade step 'sqlagent100_msdb_upgrade.sql' encountered error 2714, state 6, severity 25. 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've tried using the command line to restore the master database but it's not working for me. What am I doing wrong please?

    I do the following:

    - net start mssqlserver

    - sqlcmd -U sa

    password [sa password]

    but the SQL service either stops by the time I've entered the password, or I get

    Login failed for user 'sa'. Reason: Server is in script upgrade mode. Only administrator can connect at this time.

    Any help gratefully received! Thanks

  • Try and connect with a dedicated connection (DAC) and run the failing script again:

    sqlagent100_msdb_upgrade.sql error /[/url]

  • Thanks for replying. It wouldn't actually even let me connect through the DAC. I forgot to mention.

    What I have managed to do is rebuild the master database: http://www.codeproject.com/Tips/537811/Rebuilding-Master-Database-in-SQL-Server

    Now I just need to restore it from the backup. However, this can only be done in single-user mode, and even though I think I'm setting it to single-user mode, it's not having it. Any suggestions please?

    In the command prompt I'm typing

    net start mssqlserver -m

    Is this right? It seems to be working but when I try to restore the database using sql cmd I get the error message saying it needs to be in single-user mode.

    Thanks!

  • Right, I realised it should be

    net start mssqlserver /m

    which worked.

    However, it now won't let me restore the backup because it was taken on the version of SQL Server before the SP was applied :crazy:.

  • Beatrix Kiddo (1/9/2014)


    Right, I realised it should be

    net start mssqlserver /m

    which worked.

    However, it now won't let me restore the backup because it was taken on the version of SQL Server before the SP was applied :crazy:.

    Didn't you try uninstalling the Service Pack from the control panel ?


    Sujeet Singh

  • Yep, done that! But some coincidental error with storage meant that the C:\ bloated and the uninstall failed several times. I think it's working now. Just got to restore the system databases now.

  • Right, all done, I hope. I have aged about a million years.

  • see this for the error you had.

    try restoring your msdb as a user database (this server or elsewhere) and see if you can fix the problem so that script runs. Also ensure you run the upgrade as an administrator.

    ---------------------------------------------------------------------

  • I tried that early on but thank you. It didn't work for me. Rebuilding the databases did though so all is ok now!

  • will you be retrrying SP2? If so you need to be sure you won't hit the same error again.

    ---------------------------------------------------------------------

  • Right now, no. I'm leaving in a couple of weeks, so I'm afraid I'm not going to risk it. I don't have any support here and I can't risk an outage like that again. (What I don't understand is that I had tested it twice in identical environments.)

    I meant to say I know this is bread and butter to most of you, but if you're not regularly backing up your system databases, start doing it now. I would have been stuffed without recent backups of those.

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply