Products | Versions |
---|---|
Spotfire Server | All supported versions |
During a Spotfire Server upgrade, the upgrade script may fail with the following error:
--------------------------------------------------------------------
Unable to upgrade database
com.spotfire.server.tools.upgrade.DatabaseUpgradeException:
ORA-01407: cannot update ("xxxxx"."LIB_DATA"."CONTENT_SIZE") to NULL
--------------------------------------------------------------------
This error can happen when there are rows in the LIB_DATA table that do not have corresponding entries in the LIB_ITEMS table. A foreign key constraint would typically prevent this issue, but it may have been disabled or removed.
To resolve the issue, please try the following steps.
Important Note: Before executing the commands below, please restore the database and ensure that you keep a backup of the original.
1. select * from LIB_DATA ld where not exists (select 1 from LIB_ITEMS li where li.ITEM_ID = ld.ITEM_ID);
2. delete from LIB_DATA ld where not exists (select 1 from LIB_ITEMS li where li.ITEM_ID = ld.ITEM_ID);
3. alter table LIB_DATA constraint enable constraint FK_LIB_DATA_ITEM_ID
4. Run upgradetool.bat later.