The Datamart Rollup (DMR) job fails with constraint NBI_RT_FACTS_PK violated error

Document ID : KB000005981
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

The Datamart Rollup job fails with one of the following errors:

[CA Clarity][Oracle JDBC Driver][Oracle]ORA-20000: Error in NBI_EXTRACT_SP - Executing NBI_EXTR_PCF_SP: ORA-20000: Error in NBI_EXTR_PCF_SP - executing NBI_PROJECT_CURRENT_FACTS_SP: ORA-20000: Error in NBI_PROJECT_CURRENT_FACTS_SP - Calling NBI_PRTF_FM_SP since FM is enabled: ORA-01403: no data found

Datamart Rollup - Time Facts and Time Summary) Error executing job: 5158044 error java.sql.SQLException: [CA Clarity][Oracle JDBC Driver][Oracle]ORA-20000: Error in CMN_JOB_DATAMART_ROLLUP_SP - ORA-20000: Error in NBI_EXTRACT_TF_TS_SP - Rolling up NBI_RT_FACTS: ORA-20000: Error in NBI_RTF - Processing Rollup SQL and insert into summary table: ORA-00001: unique constraint (SC51320P.NBI_RT_FACTS_PK) violated

Cause:

The job will fail if it cannot produce the data for the amount of monthly fiscal time periods created in
Adminstration > Finance > Setup > Entity > Fiscal time periods

Run the following queries to check

--a daily resource time slices setup
select 'TS SETUP', id, request_name, from_date, num_periods, to_date, request_completed_date, expiration_date
from PRJ_BLB_SLICEREQUESTS
where id in (1,2,3,10,11)
order by id

--b min/max from daily time slices
SELECT 'TS MIN/MAX', MIN(FROM_DATE), MAX(TO_DATE)
FROM PRJ_BLB_SLICEREQUESTS
where id in (1,2,3,10,11)

--c get fiscal time periods
SELECT * FROM BIZ_COM_PERIODS
WHERE PERIOD_TYPE = 'MONTHLY'
order by start_date

SELECT 'FISCAL MIN/MAX' MONTH, min(start_date), max(end_date)
FROM BIZ_COM_PERIODS
WHERE PERIOD_TYPE = 'MONTHLY'


Resolution:

This is a configuration issue, therefore if the DAILY resource time slices do not cover the monthly fiscal time range end date, then perform the following:

1. Pause the Time Slicing job when it is in the WAITING or SCHEDULED state only.

2. Set the following configuration:

id = 1, set number of periods = 730
id= 2, set number of periods = 730
id= 3, set number of periods = 730
id = 10, set number of periods = 730
id = 11, set number of periods = 730

3. Resume/Unpause the Time Slicing job and let it complete.

4. Run the Datamart Extraction job.

5. Run the Datamart Rollup job.

 

Additional Information:

https://communities.ca.com/thread/241700657
CA PPM Tech Tip: How to check the Datamart (Datamart Extraction and Datamart Rollup jobs)