Failures while upgrading a server installation fall into one of two categories: failure to upgrade an individual database, or failure to complete configuration changes after all databases have been upgraded.
dbcc traceon(990)
This trace flag grants access only to user “sa”. It is not sufficient to use an account having “sa_role”. If you have disabled the “sa” login, you must re-enable it to get access using this method.
Having set this trace flag, user “sa” can now use the offline database and make the necessary changes to correct the upgrade failure.
online database <failed_db_name>
The server restarts that database’s upgrade from the point of failure.
$SYBASE/$SYBASE_ASE/upgrade/upgrade
When restarted in this way, the upgrade process says it is “verifying” the upgrade rather than “starting” it, but it makes all the same checks as for the original upgrade.
declare @dbname varchar(255) select @dbname = min(name) from master..sysdatabases while @dbname is not null begin online database @dbname select @dbname = min(name) from master..sysdatabases where name > @dbname end
There are certain upgrade failures from which the server cannot recover. For example, attempts to upgrade system tables to version 15.x format are quite sensitive to failures at certain points during the required changes. If you encounter such a failure, restore the failed database from backup. To prevent the upgrade from failing again, correct the problem that caused the original failure before issuing the online database command for that database. These catastrophic failures are nearly always caused by running out of resources, as described above, which then causes a failure to undo the aborted transaction.