SQL Queries - CAST Measure Base - Checking and removing corruptions - Missing link between the applications and the user defined modules


Purpose of Query

 This page helps you to check whether the link between the applications and the user defined modules  is missing or not. If it is, it provides you the remediation to add the link manually.

Applicable CAST Version

 

Release

Yes/No

8.3.x (coche) 
8.2.x (coche) 
8.1.x (coche) 
8.0.x (coche) 
Applicable RDBMS

 

RDBMS

Yes/No
Oracle Server (coche) 
Microsoft SQL Server (coche) 
CSS2 (coche) 


Query for CSS
SELECT DOS1.object_name AS application, 
       DOS2.object_name AS module 
FROM   dss_links DLS 
       JOIN dss_objects DOS2 
         ON DLS.next_object_id = DOS2.object_id 
            AND DOS2.object_type_id = 20000 
       JOIN dss_objects DOS1 
         ON DLS.previous_object_id = DOS1.object_id 
            AND DOS1.object_type_id = -102 
            AND DLS.link_type_id = 1 
Query result example
  A;B
Query result interpretation
 The query returns the application name and the User defined modules linked to the application. If no rows are returned then there is no link.

If the query returns no rows then you need to manually add the link between the application and the module

  1. Fetch the application_ID using the below query :

    SELECT object_id
           FROM    dss_objects
           WHERE   object_type_id = -102
  2. Fetch the module_ID using the below query :

    SELECT object_id
           FROM    dss_objects
           WHERE   object_type_id = 20000
  3. Insert the link:

    Insert into dss_links values(application_id , module_id , 1)
Query for Oracle
SELECT DOS1.object_name AS application, 
       DOS2.object_name AS module 
FROM   dss_links DLS 
       JOIN dss_objects DOS2 
         ON DLS.next_object_id = DOS2.object_id 
            AND DOS2.object_type_id = 20000 
       JOIN dss_objects DOS1 
         ON DLS.previous_object_id = DOS1.object_id 
            AND DOS1.object_type_id = -102 
            AND DLS.link_type_id = 1 
Query result example
  A;B
Query result interpretation
 The query returns the application name and the user defined modules linked to the application. If no rows are returned then there is no link.

If the query returns no rows then you need to manually add the link between the application and the module.

  1. Fetch the application_ID using the below query :

    SELECT object_id
           FROM    dss_objects
           WHERE   object_type_id = -102
  2. Fetch the module_ID using the below query :

    SELECT object_id
           FROM    dss_objects
           WHERE   object_type_id = 20000
  3. Insert the link :

    Insert into dss_links values(application_id , module_id , 1)
Query for SQL server
SELECT DOS1.object_name AS application, 
       DOS2.object_name AS module 
FROM   dss_links DLS 
       JOIN dss_objects DOS2 
         ON DLS.next_object_id = DOS2.object_id 
            AND DOS2.object_type_id = 20000 
       JOIN dss_objects DOS1 
         ON DLS.previous_object_id = DOS1.object_id 
            AND DOS1.object_type_id = -102 
            AND DLS.link_type_id = 1 
Query result example
  A;B
Query result interpretation
 The query returns the application name and the user defined modules linked to the application. If no rows are returned then there is no link

If the query returns no rows then you need to manually add the link between the application and the module.

  1. Fetch the application_ID using the below query :

    SELECT object_id
           FROM    dss_objects
           WHERE   object_type_id = -102
  2. Fetch the module_ID using the below query :

    SELECT object_id
           FROM    dss_objects
           WHERE   object_type_id = 20000
  3. Insert the link :

    Insert into dss_links values(application_id , module_id , 1)
Notes/comments
 

 

Related Pages