Manual Upgrade

Brad Chapman asked on March 2, 2018 02:16

Hey All

This appears to be a common thread but I'm asking the question afresh.

Is there a procedure for easily upgrading the SQL DB only?

We have a common situation where we are moving our installation to a new server and wish to upgrade from 8.1 to 9 to maintain support. This involves setting a up a new Version 9 installation and then connecting this to our existing 8.1 DB. We have run the update scripts for version 8.1 to 8.1 and 8.2 to 9.0 on the SQL db.

We now get the all to familiar "Invalid column name 'DocumentInheritsStylesheet'" error. I am fully aware this is due to the steps that need to occur after a normal in place upgrade to finalise the database.

The question is how can we complete the above without having to go through the whole process of an in place upgrade from 8.1 to 8.2 then 8.2 to 9.0. on a production server without excessive downtime to our business?

Is there a way to script the finalisation steps contained in "UpgradeProcedure.cs" so that the fresh version 9 will accept the upgraded database? Can one manually run this file somehow?

Cheers, Brad

Recent Answers

Brenden Kehren answered on March 2, 2018 06:55

You need to run the site to execute code after you run the database scripts at every version upgrade.

Process should be pretty simple. If you already have the code upgraded and tested then do these steps:

  1. On your local machine, create a fresh install of v8.1.
  2. Run the KIM against the fresh install with the connection string pointing to the production server database.
  3. Run the site after each upgrade
  4. Do this until you get to version 9.
  5. Connect your production code to the upgraded database and run.

The steps are pretty simple and high level but should get you going in the right direction.

1 votesVote for this answer Mark as a Correct answer

Jan Šedo answered on March 2, 2018 15:20 (last edited on March 2, 2018 15:20)

What Brenden says. To speed this up even further, you can create a set of upgraded vanilla instances to finish your upgrades. I've seen this approach for longer, simplified upgrade paths. Create a fresh 8.1 instance, upgrade it to 8.2 and keep it (name it finish81to82), then create second fresh 8.2 instance and upgrade it to v9 (name it finish82to90).

Then simplified steps would go, for your 8.1 DB:

1) Run SQL upgrade script 8.1>8.2 and connect it to finish81to82 instance, run this instance.

2) Run SQL upgrade script 8.2>9.0 and connect it to finish82to90 instance, run this instance.

3) Connect your upgraded DB to the 9.0 upgraded codebase.

You can tell that the finishing script (UpgradeProcedure.cs) did the final touches by checking Event Log, look for UPGRADE - FINISH event.

1 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on March 5, 2018 10:12

I am afraid but you always must follow the upgrade instructions and upgrade from version to version. If shortcuts were possible, they would be listed in the documentation.
Anyway, this article may give you some insight what is going on during the upgrade and why this is needed.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.