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

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.

2 votesVote for this answer Unmark Correct answer

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

Brad Chapman answered on May 8, 2018 07:08

Thanks All We ended up just moving to a new server and upgrading in sequence then hot-swapping the DNS. Cheers, Brad

0 votesVote for this answer Mark as a Correct answer

Kerri Sweeney answered on June 12, 2018 22:51

This process works well. Does anyone have suggestions for how to handle transformations if you're doing the upgrade this way?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on June 13, 2018 00:36

Check your transformations out into the file system in the System > Virtual Objects section. After you check them out, copy them to another directory (as a backup) and then hit the check back in.

Run the upgrade. Check the transformations out, update them in visual studio and then check them back in.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on June 18, 2018 06:53

Just to add to what Brenden wrote - after you save the virtual objects to disk, you can use the code ugprade tool to check the code. See also the documentation.

0 votesVote for this answer Mark as a Correct answer

Kerri Sweeney answered on June 18, 2018 15:01

I don't have access to the production environment so I'm trying to figure out the best way to perform the upgrade for that environment. I have the updated transformations but I was trying to figure out if there was another way to get them back in the database.

Theoretically, I could script many of the steps that need to be done and have someone with access run the scripts but the transformations complicate that a bit.

Thank you both for the input!

0 votesVote for this answer Mark as a Correct answer

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