When upgrading Harvest to the latest version, the software installation succeeds but the database upgrade fails. Hdbsetup returns this error message:
"Error updating schema. Check log updateschema.log for error"
And the updateschema.log file returns this error:
2023/03/22 14:31:16 E03020003: Database error [Oracle][ODBC][Ora]ORA-00959: tablespace 'HARVESTINDEX' does not exist
SQLSTATE=S1000 .
Release : 14.0
When Harvest installs its database to an Oracle DBMS, by default, it sets up three tablespaces with the names HARVESTMETA, HARVESTINDEX, and HARVESTBLOB.
This error message tells us that Hdbsetup cannot find an Oracle tablespace named HARVESTINDEX.
Logging into SQL Plus, we can get a list of the names of the tablespaces available to the harvest user:
This explains why hdbsetup could not find the HARVESTINDEX tablespace. The DBA has renamed the Harvest tablespaces according to the naming standards he or the company has chosen.
We must configure Harvest so that it can find the tablespaces it needs using the new tablespace names. We do this by adding the following lines to the hserver.arg file:
-harvestindex=myscmindex
-harvestmeta=myscmmeta
-harvestblob=myscmblob
We will also need to complete one of the following two options:
After completing this change, restart Hdbsetup and try the “UR” option again.
This time, the Upgrade Repository step succeeded.
And checking the updateschema.log we see a much better result:
It is possible when you encounter this error with HARVESTINDEX tablespace name that the database schema is left in a state of partial completion. If this happens, subsequent runs of hdbsetup UR option will fail as well for various reasons. In this situation, the simplest solution is to restore your Harvest database from the backup that was made just before upgrading, and starting the database schema upgrade again from there.