IBM Support

Updating Statistics from Database Configuration Causes an Error

Troubleshooting


Problem

ORA-20000 error is displayed while trying to run "Update Statistics" from Database Configuration in Maximo 7.1.1.x with Maximo Spatial.

Symptom

Getting the following error while trying to run Update Statistics from Database Configuration, where TABLE01 is a synonym to a remote table in GIS system:

ORA-20000: Unable to analyze TABLE
"MAXIMO"."TABLE01", insufficient privileges or does not exist
ORA-06512: at "SYS.DBMS_STATS", line 13427
ORA-06512: at "SYS.DBMS_STATS", line 13457
ORA-06512: at "MAXIMO.MAXIMO_GATHER_TABLE_STATS", line 1
ORA-06512: at line 1
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
oracle.jdbc.driver.T4CCallableStatement.doOall8
(T4CCallableStatement.java:215)
oracle.jdbc.driver.T4CCallableStatement.executeForRows
(T4CCallableStatement.java:954)
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout
(OracleStatement.java:1168)
oracle.jdbc.driver.OraclePreparedStatement.executeInternal
(OraclePreparedStatement.java:3316)
oracle.jdbc.driver.OraclePreparedStatement.execute
(OraclePreparedStatement.java:3422)
oracle.jdbc.driver.OracleCallableStatement.execute
(OracleCallableStatement.java:4394)
psdi.app.configure.ConfigureService.updateStatistics
(ConfigureService.java:702)
psdi.webclient.beans.configur.ConfigurBean.statistics_longOp
(ConfigurBean.java:298)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
psdi.webclient.system.session.AsyncProcess.run(AsyncProcess.java:95)
java.lang.Thread.run(Thread.java:595)

Resolving The Problem


1. Ensure that no database configuration changes are pending.

2. Stop Maximo application server.

3. Back up Maximo database.

4. Login to the Maximo database with SQLPlus or equivalent interactive SQL tool as the Maximo schema owner.

5. Copy paste the entire script listed below, including the final forward slash.

6. Press execute SQL icon or enter key as appropriate for the tool being used.

7. Will see message that PL/SQL compiled without any errors.

8. Restart Maximo application server.

Script:
create or replace procedure maximo_gather_table_stats (ownerin varchar2, tablein varchar2)
is
table_count integer ;
begin
select count(*) into table_count from all_tables where owner = upper(ownerin) and table_name = upper(tablein);
if table_count > 0 then
dbms_stats.gather_table_stats (ownname => ownerin, tabname => tablein, cascade => true);
end if;
end;
/

[{"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Database Config","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.1;7.1.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
17 June 2018

UID

swg21579060