Thursday, 15 June 2017

Server is in script upgrade mode

A gotcha from an old SQL 2008 instance today,  'Server is in script upgrade mode'.

Windows Updates had been allowed to include 2008 SP3 (yes I am writing this in 2017!) and the upgrade failed. On starting up, SQL tried (and failed) to bring the tables in the master database up to date. On restart, it would try again.

With no rollback position I attempted restoring the master databases via single user mode, but this proved impossible.  In order to get the server live once more I added trace flag 902 to the startup parameters. This prevents the script update from occurring.

The result is a server whose binaries are at SP3, but the master database is at SP2.
It works, it's far from desirable and certainly cannot be upgraded again, but it lives,
The users know no different and it gives us time to plan a migration.