SQL Queries - CAST Knowledge Base - Corruptions - Corruptions on datafunctions - How to list the Datafunction ID being a merge root of a DF but it doesn't have the flag stating it is a merge root

Purpose of Query

The SQL query in this page lists the Datafunctions id being a merge mother of a DF but it doesn't have the flag stating it is a merge mother. Note that this corruption is fixed in 8.3.0.

  • The Datafunction being a merge root is the data function that has been merged with others, and it is the root of the merge, so it appears on the dashboard and TCC)
  • The Datafunction being a merged item is the data function that has been merged as a child of another one, so it does not appear in the dashboard and TCC.
Applicable CAST Version
Release
Yes/No
8.2.x(tick)
8.1.x(tick)
8.0.x(tick)
7.3.x(tick)
Applicable RDBMS
RDBMS
Yes/No
Oracle Server(question)
Microsoft SQL Server(question)
CSS2(tick)
Query for CSS
SELECT DF1.object_id
FROM   dss_datafunction DF1, 
       dss_datafunction DF2 
WHERE  ( ( DF1.cal_flags & 4 ) = 4 )  
       AND ( DF2.object_id = DF1.cal_mergeroot_id ) 
       -- DF2 is the merge root of DF1 
       AND ( ( DF2.cal_flags & 2 ) = 0 ) 
       AND ( ( DF2.cal_flags & 4 ) = 0 ) 
ORDER  BY DF1.object_id; 
Query result example
 –- 7397329
Query result interpretation
The above result return the id of the data function id being a merge mother of a DF but it doesn't have the flag stating it is a merge mother

Remediation for this corruption:

Remediation
UPDATE dss_datafunction ROOT 
SET    cal_flags = ROOT.cal_flags + 2 
FROM   dss_datafunction ITEM 
WHERE  ROOT.object_id = ITEM.cal_mergeroot_id 
       AND ( ( ROOT.cal_flags & 2 ) = 0 )
       AND ROOT.appli_id = i_appli_id 
       AND ITEM.appli_id = i_appli_id; 

Impact of the correction:

The correction can impact the FP count of the application.

Query for Oracle
Enter the SQL query
Query result example
 
Query result interpretation
 
Query for SQL server
Enter the SQL query
Query result example
 
Query result interpretation
 
Notes/comments
 

 

 

Related Pages