When the catupgrd.sql is run during the manual upgrade process, it ends with “ORA-01722: invalid number” error due to the Database Vault configuration in the database.
In this case, the Database Vault must be set to off.
SELECT TO_NUMBER('LABEL_SECURITY_OPTION_OFF') FROM v$option
ERROR at line 1:
ORA-01722: invalid number
You can set to off the Database Vault with the following steps for the solution of the error. All services that use the relevant binary must be closed beforehand.
[oracle@oradb01 ~]$ cd $ORACLE_HOME/rdbms/lib
[oracle@oradb01 lib]$ make -f ins_rdbms.mk dv_off
/usr/bin/ar cr /u01/app/oracle/product/126.96.36.199/dbhome_1/rdbms/lib/libknlopt.a /u01/app/oracle/product/188.8.131.52/dbhome_1/rdbms/lib/kzvndv.o
[oracle@oradb01 lib]$ make -f ins_rdbms.mk lbac_on
/usr/bin/ar d /u01/app/oracle/product/184.108.40.206/dbhome_1/rdbms/lib/libknlopt.a kzlnlbac.o
/usr/bin/ar cr /u01/app/oracle/product/220.127.116.11/dbhome_1/rdbms/lib/libknlopt.a /u01/app/oracle/product/18.104.22.168/dbhome_1/rdbms/lib/kzlilbac.o
[oracle@oradb01 lib]$ cd $ORACLE_HOME/bin
[oracle@oradb01 bin]$ relink all
writing relink log to: /u01/app/oracle/product/22.214.171.124/dbhome_1/install/relink.log
If you are using an RAC database, these operations must be performed on all nodes separately.
Then restart with “startup upgrade” and you can run catupgrd.sql successfully.