CA UIM Primary HUB upgrade is failing from 8.4 to 8.5.1

Document ID : KB000095435
Last Modified Date : 16/05/2018
Show Technical Document Details
Issue:
We are trying to upgrade UIM from 8.4 to 8.5.1 and it is failing after the below step. =============================================================================== Database Schema Configuration -----------------------------
[1/10] oracle_nis_base_create.sql ... - OK
[2/10] oracle_slm_create.sql ... - OK
[3/10] oracle_dataengine_create.sql ...

It is exiting automatically after oracle_dataengine_create.sql without any error message or any status.

The following error is logged in the uimserver_ia_install.log

2018-05-10 10:59:45,831 DEBUG util.NimDBScriptRunner:executeSQLCommand:102 [main]  - Executing SQL command: call spn_de_Upgrade()
2018-05-10 10:59:48,535 ERROR impl.UIMServerDBSchemaController:run:133 [main]  - NimException caught
(503) , java.sql.SQLException: ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "UIMADMIN.SPN__LOGEVENT", line 12
ORA-06512: at "UIMADMIN.SPN_BAS_EXECUTEDDL", line 31
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "UIMADMIN.SPN_DE_CREATEVIEW", line 30
ORA-06512: at "UIMADMIN.SPN_DE_UPGRADE", line 64
: ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "UIMADMIN.SPN__LOGEVENT", line 12
ORA-06512: at "UIMADMIN.SPN_BAS_EXECUTEDDL", line 31
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "UIMADMIN.SPN_DE_CREATEVIEW", line 30
ORA-06512: at "UIMADMIN.SPN_DE_UPGRADE", line 64

    at com.nimsoft.nimdbprovider.base.util.NimDBScriptRunner.runDBScript(NimDBScriptRunner.java:77)
    at com.nimsoft.nimdbprovider.base.provider.NimDBProviderBase.runDBScript(NimDBProviderBase.java:252)
    at com.nimsoft.nimdbprovider.base.provider.NimDBProviderBase.runDBScriptFile(NimDBProviderBase.java:185)
    at com.nimsoft.install.uimserver.action.impl.UIMServerDBSchemaController.runScriptCommon(UIMServerDBSchemaController.java:276)
    at com.nimsoft.install.uimserver.action.impl.UIMServerDBSchemaController.configureDataengineCreate(UIMServerDBSchemaController.java:212)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.nimsoft.install.nimcommon.method.NimMethodCallback.invokeMethod(NimMethodCallback.java:532)
    at com.nimsoft.install.nimcommon.method.NimMethodCallback.invokeMethod(NimMethodCallback.java:516)
    at com.nimsoft.install.uimserver.action.impl.UIMServerDBSchemaController.doConfigure_dbScript(UIMServerDBSchemaController.java:169)
    at com.nimsoft.install.uimserver.action.impl.UIMServerDBSchemaController.doConfigure(UIMServerDBSchemaController.java:147)
    at com.nimsoft.install.uimserver.action.impl.UIMServerDBSchemaController.run(UIMServerDBSchemaController.java:131)
    at com.nimsoft.install.uimserver.console.ia.UIMServerDBSchemaIACustomCodeConsole.nimExecuteConsoleAction(UIMServerDBSchemaIACustomCodeConsole.java:67)
    at com.nimsoft.install.iacore.console.NimCustomCodeConsoleBase.executeConsoleAction(NimCustomCodeConsoleBase.java:114)
    at com.zerog.ia.installer.ConsoleBasedAAMgr.ah(Unknown Source)
    at com.zerog.ia.installer.ConsoleBasedAAMgr.ac(Unknown Source)
    at com.zerog.ia.installer.ConsoleBasedAAMgr.runPostInstall(Unknown Source)
    at com.zerog.ia.installer.LifeCycleManager.consoleInstallMain(Unknown Source)
    at com.zerog.ia.installer.LifeCycleManager.executeApplication(Unknown Source)
    at com.zerog.ia.installer.Main.main(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.zerog.lax.LAX.launch(Unknown Source)
    at com.zerog.lax.LAX.main(Unknown Source)
Caused by: java.sql.SQLException: ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "UIMADMIN.SPN__LOGEVENT", line 12
ORA-06512: at "UIMADMIN.SPN_BAS_EXECUTEDDL", line 31
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "UIMADMIN.SPN_DE_CREATEVIEW", line 30
ORA-06512: at "UIMADMIN.SPN_DE_UPGRADE", line 64

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:194)
    at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1000)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
    at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1882)
    at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1847)
    at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:301)
    at com.nimsoft.nimdbprovider.base.util.NimDBScriptRunner.executeSQLCommand(NimDBScriptRunner.java:104)
    at com.nimsoft.nimdbprovider.base.util.NimDBScriptRunner.runDBScript(NimDBScriptRunner.java:59)
    ... 27 more
2018-05-10 10:59:48,536 ERROR console.NimCustomCodeConsoleBase:executeConsoleAction:134 [main]  - Exception caught during processing. Aborting installation.
(503) , java.sql.SQLException: ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "UIMADMIN.SPN__LOGEVENT", line 12
ORA-06512: at "UIMADMIN.SPN_BAS_EXECUTEDDL", line 31
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "UIMADMIN.SPN_DE_CREATEVIEW", line 30
ORA-06512: at "UIMADMIN.SPN_DE_UPGRADE", line 64
: ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "UIMADMIN.SPN__LOGEVENT", line 12
ORA-06512: at "UIMADMIN.SPN_BAS_EXECUTEDDL", line 31
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "UIMADMIN.SPN_DE_CREATEVIEW", line 30
ORA-06512: at "UIMADMIN.SPN_DE_UPGRADE", line 64

    at com.nimsoft.nimdbprovider.base.util.NimDBScriptRunner.runDBScript(NimDBScriptRunner.java:77)
    at com.nimsoft.nimdbprovider.base.provider.NimDBProviderBase.runDBScript(NimDBProviderBase.java:252)
    at com.nimsoft.nimdbprovider.base.provider.NimDBProviderBase.runDBScriptFile(NimDBProviderBase.java:185)
    at com.nimsoft.install.uimserver.action.impl.UIMServerDBSchemaController.runScriptCommon(UIMServerDBSchemaController.java:276)
    at com.nimsoft.install.uimserver.action.impl.UIMServerDBSchemaController.configureDataengineCreate(UIMServerDBSchemaController.java:212)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.nimsoft.install.nimcommon.method.NimMethodCallback.invokeMethod(NimMethodCallback.java:532)
    at com.nimsoft.install.nimcommon.method.NimMethodCallback.invokeMethod(NimMethodCallback.java:516)
    at com.nimsoft.install.uimserver.action.impl.UIMServerDBSchemaController.doConfigure_dbScript(UIMServerDBSchemaController.java:169)
    at com.nimsoft.install.uimserver.action.impl.UIMServerDBSchemaController.doConfigure(UIMServerDBSchemaController.java:147)
    at com.nimsoft.install.uimserver.action.impl.UIMServerDBSchemaController.run(UIMServerDBSchemaController.java:131)
    at com.nimsoft.install.uimserver.console.ia.UIMServerDBSchemaIACustomCodeConsole.nimExecuteConsoleAction(UIMServerDBSchemaIACustomCodeConsole.java:67)
    at com.nimsoft.install.iacore.console.NimCustomCodeConsoleBase.executeConsoleAction(NimCustomCodeConsoleBase.java:114)
    at com.zerog.ia.installer.ConsoleBasedAAMgr.ah(Unknown Source)
    at com.zerog.ia.installer.ConsoleBasedAAMgr.ac(Unknown Source)
    at com.zerog.ia.installer.ConsoleBasedAAMgr.runPostInstall(Unknown Source)
    at com.zerog.ia.installer.LifeCycleManager.consoleInstallMain(Unknown Source)
    at com.zerog.ia.installer.LifeCycleManager.executeApplication(Unknown Source)
    at com.zerog.ia.installer.Main.main(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.zerog.lax.LAX.launch(Unknown Source)
    at com.zerog.lax.LAX.main(Unknown Source)
Caused by: java.sql.SQLException: ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "UIMADMIN.SPN__LOGEVENT", line 12
ORA-06512: at "UIMADMIN.SPN_BAS_EXECUTEDDL", line 31
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "UIMADMIN.SPN_DE_CREATEVIEW", line 30
ORA-06512: at "UIMADMIN.SPN_DE_UPGRADE", line 64

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:194)
    at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1000)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
    at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1882)
    at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1847)
    at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:301)
    at com.nimsoft.nimdbprovider.base.util.NimDBScriptRunner.executeSQLCommand(NimDBScriptRunner.java:104)
    at com.nimsoft.nimdbprovider.base.util.NimDBScriptRunner.runDBScript(NimDBScriptRunner.java:59)
    ... 27 more
2018-05-10 10:59:48,537 INFO  util.IAAbortInstallerUtils:abortInstall:23 [main]  - Calling abortInstall
Environment:
OS:  Linux RHEL 7.5 64-bit
Database Server:  Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
UIM Server:  8.4 upgrading to 8.51
Cause:
Unexpected number of rows returned for spn__LogEvent stored procedure causing the upgrade install to fail.
Resolution:
This process will only work for Linux with Oracle.
Here are the deployment instructions:

1. Place both scripts in the nimsoft home folder (assuming /opt/nimsoft) of the primary hub. Do not rename the files.
- /opt/nimsoft/oracle_nis_base_create_fixed.sql
- /opt/nimsoft/replace_script.sh

2. Make the replace_script.sh script executable

cd /opt/nimsoft
chmod a+x replace_script.sh

3. As root, run replace_script.sh. It should indicate that it is waiting for the installer. Script output should be as shown:

# ./replace_script.sh
SQL replacement script running
SQL already exists, moving out of the way.
moving 'nis/sql/oracle/oracle_nis_base_create.sql' to 'nis/sql/oracle/oracle_nis_base_create.sql.old'
Waiting for installer to write SQL to 'nis/sql/oracle/oracle_nis_base_create_fixed.sql'

4. Leaving the script in this running state, run the upgrade install again (in another login shell). When the oracle_nis_base_create.sql script is laid down by the installer, the running replace_script.sh will replace it with oracle_nis_base_create_fixed.sql and exit.

5. After the install is complete, it will have installed using the version of spn__LogEvent in the attached spn__LogEvent.sql file. You do not have to do anything with this file, it is just there for your review.
Additional Information:
Similar problem reported on upgrade from UIM 8.31 to UIM 8.51
File Attachments:
spn__LogEvent_after_upgrade.zip