SQL Queries - CAST Measure Base - Checking and removing corruptions - Missing link between the applications and the full content module

Purpose of Query

 This page helps you to check whether the link between the applications and the full content module 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 O1.object_name, 
       O2.object_name 
FROM   (SELECT * 
        FROM   dss_links 
        WHERE  previous_object_id IN (SELECT object_id 
                                      FROM   dss_objects 
                                      WHERE  object_type_id = -102) 
               AND next_object_id IN (SELECT object_id 
                                      FROM   dss_objects 
                                      WHERE  object_type_id = 20000) 
               AND link_type_id = 0)A 
       JOIN dss_objects O1 
         ON O1.object_id = A.previous_object_id 
       JOIN dss_objects O2 
         ON O2.object_id = A.next_object_id 
WHERE  O1.object_name = 'Name of the aplication' 
Query result example
  A;B
Query result interpretation
 The query returns the application name and the full content module 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 , 0)
Query for Oracle
SELECT O1.object_name, 
       O2.object_name 
FROM   (SELECT * 
        FROM   dss_links 
        WHERE  previous_object_id IN (SELECT object_id 
                                      FROM   dss_objects 
                                      WHERE  object_type_id = -102) 
               AND next_object_id IN (SELECT object_id 
                                      FROM   dss_objects 
                                      WHERE  object_type_id = 20000) 
               AND link_type_id = 0)A 
       JOIN dss_objects O1 
         ON O1.object_id = A.previous_object_id 
       JOIN dss_objects O2 
         ON O2.object_id = A.next_object_id 
WHERE  O1.object_name = 'Name of the aplication' 
Query result example
  A;B
Query result interpretation
 The query returns the application name and the full content module 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 , 0)
Query for SQL server
SELECT O1.object_name, 
       O2.object_name 
FROM   (SELECT * 
        FROM   dss_links 
        WHERE  previous_object_id IN (SELECT object_id 
                                      FROM   dss_objects 
                                      WHERE  object_type_id = -102) 
               AND next_object_id IN (SELECT object_id 
                                      FROM   dss_objects 
                                      WHERE  object_type_id = 20000) 
               AND link_type_id = 0)A 
       JOIN dss_objects O1 
         ON O1.object_id = A.previous_object_id 
       JOIN dss_objects O2 
         ON O2.object_id = A.next_object_id 
WHERE  O1.object_name = 'Name of the aplication' 
Query result example
  A;B
Query result interpretation
 The query returns the application name and the full content module 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 , 0)
Notes/comments
 

 

Related Pages