SQL Queries - CAST Central Base - Checking and removing corruptions in CB - Objects with missing types

Purpose of Query

This page helps to identify the list of objects with missing types.

Applicable CAST Version

ReleaseYes/No
8.3.x✅
8.2.x✅
8.1.x✅
8.0.x✅

Applicable RDBMS

RDBMSYes/No
Oracle Server✅
Microsoft SQL Server✅
CSS2✅

Query for CSS

SELECT DISTINCT do1.object_name    AS "Invalid Object Name", 
                do1.object_type_id AS "Missing Object Type ID", 
                do2.object_id      AS "Container ID", 
                do2.object_name    AS "Container Name", 
                CASE do2.object_type_id 
                  WHEN -102 THEN 'Application' 
                  WHEN -101 THEN 'System' 
                  WHEN 20000 THEN 'Module' 
                END                AS "Container Type", 
                dtt.site_id        AS "Central Site ID" 
FROM   dss_objects do1 
       JOIN dss_translation_table dtt 
         ON dtt.object_id = do1.object_id 
       JOIN dss_links dl 
         ON dl.next_object_id = do1.object_id 
       JOIN dss_objects do2 
         ON do2.object_id = dl.previous_object_id 
       LEFT JOIN dss_object_types sot 
              ON sot.object_type_id = do1.object_type_id 
WHERE  sot.object_type_id IS NULL 
       AND do1.object_type_id NOT IN ( -101, -102, 20000 )

Query result example

“xyz”;138049;16419250;“ABCD”;"";243

Query result interpretation

In the provided example, for application “ABCD “, represented by CB of Site Id 243  there is one object of type 138049 and this type is missing.

How to fix the issue?
  1. Missing type is from a custom/UA technology
    1. From ServMan, reinstall components on the CB, from an environment where the needed custom technologies are correctly deployed

    2. Check that the missing technology type is now present in the CB:

SELECT *  FROM   dss_object_types  WHERE  object_type_id = 

   3. From CAST-MS, select the Dashboard Service containing the "ABCD" application, then consolidate snapshot
2. ###### Missing type is from a standard technology.

   1. ###### Contact [CAST Technical Support](https://help.castsoftware.com/hc/en-us/articles/204189137-How-to-contact-CAST-Technical-Support)

**Query for Oracle**

```sql
SELECT DISTINCT do1.object_name    AS "Invalid Object Name", 
                do1.object_type_id AS "Missing Object Type ID", 
                do2.object_id      AS "Container ID", 
                do2.object_name    AS "Container Name", 
                CASE do2.object_type_id 
                  WHEN -102 THEN 'Application' 
                  WHEN -101 THEN 'System' 
                  WHEN 20000 THEN 'Module' 
                END                AS "Container Type", 
                dtt.site_id        AS "Central Site ID" 
FROM   dss_objects do1 
       JOIN dss_translation_table dtt 
         ON dtt.object_id = do1.object_id 
       JOIN dss_links dl 
         ON dl.next_object_id = do1.object_id 
       JOIN dss_objects do2 
         ON do2.object_id = dl.previous_object_id 
       LEFT JOIN dss_object_types sot 
              ON sot.object_type_id = do1.object_type_id 
WHERE  sot.object_type_id IS NULL 
       AND do1.object_type_id NOT IN ( -101, -102, 20000 )

Query result example

“xyz”;138049;16419250;“ABCD”;”";243

Query result interpretation

In the provided example, for application “ABCD “, represented by CB of Site Id 243  there is one object of type 138049 and this type is missing

How to fix the issue?

  1. Missing type is from a custom/UA technology
    1. From ServMan, reinstall components on the CB, from an environment where the needed custom technologies are correctly deployed

    2. Check that the missing technology type is now present in the CB.

SELECT *  FROM   dss_object_types  WHERE  object_type_id = 

   3. From CAST-MS, select the Dashboard Service containing the "ABCD" application, then consolidate snapshot
2. ###### Missing type is from a standard technology

   Contact [CAST Technical Support](https://help.castsoftware.com/hc/en-us/articles/204189137-How-to-contact-CAST-Technical-Support)

**Query for SQL server**

```sql
SELECT DISTINCT do1.object_name    AS "Invalid Object Name", 
                do1.object_type_id AS "Missing Object Type ID", 
                do2.object_id      AS "Container ID", 
                do2.object_name    AS "Container Name", 
                CASE do2.object_type_id 
                  WHEN -102 THEN 'Application' 
                  WHEN -101 THEN 'System' 
                  WHEN 20000 THEN 'Module' 
                END                AS "Container Type", 
                dtt.site_id        AS "Central Site ID" 
FROM   dss_objects do1 
       JOIN dss_translation_table dtt 
         ON dtt.object_id = do1.object_id 
       JOIN dss_links dl 
         ON dl.next_object_id = do1.object_id 
       JOIN dss_objects do2 
         ON do2.object_id = dl.previous_object_id 
       LEFT JOIN dss_object_types sot 
              ON sot.object_type_id = do1.object_type_id 
WHERE  sot.object_type_id IS NULL 
       AND do1.object_type_id NOT IN ( -101, -102, 20000 )

Query result example

“xyz”;138049;16419250;“ABCD”;”";243

Query result interpretation

In the provided example, for application “ABCD “, represented by CB of Site Id 243  there is one object of type 138049 and this type is missing

How to fix the issue?

  1. Missing type is from a custom/UA technology
    1. From ServMan, reinstall components on the CB, from an environment where the needed custom technologies are correctly deployed.

    2. Check that the missing technology type is now present in the CB.

SELECT *  FROM   dss_object_types  WHERE  object_type_id = 

   3. From CAST-MS, select the Dashboard Service containing the "ABCD" application, then consolidate snapshot
2. ###### Missing type is from a standard technology

   Contact [CAST Technical Support](https://help.castsoftware.com/hc/en-us/articles/204189137-How-to-contact-CAST-Technical-Support) by providing the [Relevant input](https://doc.castsoftware.com/display/TG/Application+Analytics+Dashboard+-+Views#ApplicationAnalyticsDashboard-Views-Relevantinput)

**Notes/comments**

**Related Pages**