KB Article #180597

LEC: Error ORA-20005 during upgrade to ST 5.4 or applying patches over ST 5.4

Problem

An upgrade of a SecureTransport Enterprise Cluster with Oracle DB to version 5.4 or applying Patches over ST 5.4 could fail with error ORA-20005. The following messages will be found in the install.log file:


YYYY-MM-DD HH:MM:SS ERROR Script/command error: /tmp/AxwayTempYYYY-MM-DDHHMMSS/ST/pre_upgrade.xml:614: Database schema update failed: java.sql.SQLException: ORA-20005: object statistics are locked (stattype = ALL)
YYYY-MM-DD HH:MM:SS ERROR Script/command error: ORA-06512: at "SYS.DBMS_STATS", line 24571
YYYY-MM-DD HH:MM:SS ERROR Script/command error: ORA-06512: at "SYS.DBMS_STATS", line 24629
YYYY-MM-DD HH:MM:SS ERROR Script/command error: ORA-06512: at "ST_DB_ACCOUNT.TRANSFORM_TABLES2INTERVAL", line 7
YYYY-MM-DD HH:MM:SS ERROR Script/command error: ORA-06512: at line 4


Resolution


The ST needs the DB statistics unlocked for the partition tables. You can check with the help of the DB administrator whether the statistics of some of the below tables are locked:


LOGGING_EVENT_EXCEPTION
LOGGING_EVENT_PROPERTY
TRANSFERDATA
TRANSFERPROTOCOLCOMMANDS
SUBTRANSMISSIONSTATUS
TRANSFERDETAILS
TRANSFERRESUBMITDATA


The below DB query, executed by the DBA, can be used to check which tables the statistics are locked:


SELECT DISTINCT owner,table_name,STATTYPE_LOCKED 
FROM dba_tab_statistics 
WHERE owner='__ST_DB_ACCOUNT__' AND STATTYPE_LOCKED='ALL';


The __ST_DB_ACCOUNT__ in the above query should be replaced with the username of the DB account which ST uses to connect to the database.


To proceed with the upgrade, you will need to restore from a backup the database instance and the ST application to the state before the failed upgrade. After that unlock the table statistics and apply the ST upgrade.