Clarity Upgrade fails with ORA-01720 on CMN_INDX_MONITORING_V on another user than Clarity
search cancel

Clarity Upgrade fails with ORA-01720 on CMN_INDX_MONITORING_V on another user than Clarity

book

Article ID: 442460

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS Clarity FedRAMP

Issue/Introduction

When running Clarity upgrade, an error is thrown on Oracle:

java.sql.BatchUpdateException: error occurred during batching: ORA-01720: grant option does not exist for 'SYS.USER_OBJECT_USAGE'
SQL Text:
CREATE OR REPLACE FORCE
VIEW CMN_INDX_MONITORING_V ( TABLE_NAME, INDEX_NAME, MONITORING, USED, START_MONITORING, END_MONITORING ) AS
SELECT TABLE_NAME,
               INDEX_NAME,
               MONITORING,
               USED,
               START_MONITORING,
               END_MONTIROING
                 FROM      USER_OBJECT_USAGE

 

This happens when you have a separate user, such as a read only Clarity user that throws this issue.  

  1. Setup a Clarity environment with Oracle on 16.4.1
  2. Configure a secondary user that receives view grants during schema apply - enable the read-only / reporting user
  3. Ensure the Clarity schema owner does not have SELECT … WITH GRANT OPTION on SYS.USER_OBJECT_USAGE (default state)
  4. Run the upgrade to 16.4.2

Expected Results: The upgrade to complete successfully. 

Actual Results: The upgrade fails with error java.sql.BatchUpdateException: error occurred during batching: ORA-01720: grant option does not exist for 'SYS.USER_OBJECT_USAGE' SQL Text: CREATE OR REPLACE FORCE VIEW CMN_INDX_MONITORING_V ( TABLE_NAME, INDEX_NAME, MONITORING, USED, START_MONITORING, END_MONITORING ) AS SELECT TABLE_NAME, INDEX_NAME, MONITORING, USED, START_MONITORING, END_MONTIROING FROM USER_OBJECT_USAGE. 

Environment

Clarity 16.4.2, 16.4.3 with Oracle 

Cause

DE207064

Resolution

Fixed in Clarity 16.5.0 where this permission is no longer required 

The workaround may require the view to be dropped as changing permissions whilst the object is already set may not provide them

Workaround:

  1. Drop the existing view 

    DROP VIEW CMN_INDX_MONITORING_V;
  2. Grant SELECT specifically, as SYS or SYSDBA -- replace Test with exact user name

    GRANT SELECT ON SYS.USER_OBJECT_USAGE TO <TEST>WITH GRANT OPTION;
  3. Restart your Clarity Upgrade.

    Once the old view and its conflicting grants are gone the Clarity install will run its CREATE OR REPLACE VIEW statement. It should succeed and then automatically reapply the grants

  4. After the upgrade succeeds, ensure the view CMN_INDX_MONITORING_V is present in the schema