CMS Snapshot Analysis - Information - How to check on and create links between application module and technology

Purpose

This page provides assistance on checking links between application, module and technology and then creating the links if they do not exist.

Please see the image below which shows an example of links which should be in place:

Basically there should be a link between the application and the functional module, the application and the technology, the functional module and the technology, and between the technologies themselves.

The numbers in the image show the value of the link_type_id field that should be in place for each of these links in the dss_link and dss_link_info tables.

Applicable CAST Version


Release
Yes/No
8.3.x(tick)


Applicable RDBMS
RDBMS
Yes/No
CSS(tick)
Details


  • This is a fairly complex process, so if you may want to discuss this with support if needed.
  • Please make sure you have a backup of all databases before making any changes.
  • First check for the links between the application and the functional module by first running the following query on the central database.

    SELECT *
    FROM   dss_objects
    WHERE  object_type_id=-102;

    This will normally return something like this where the first column is the application id (in this case 3):

    3;-102;"APP1";"";"APP1"
  • Then run the following using the application id obtained in the above query for the previous_object_id field and the snapshot_id (see the following TKB page if you need help determining this value:  SQL Queries - CAST Central Base - Queries on snapshots - How to get the ID and name of a snapshot for a given application):

    SELECT O.OBJECT_ID 
    FROM DSS_LINK_INFO L
    JOIN DSS_OBJECTS O
    ON O.OBJECT_ID = L.NEXT_OBJECT_ID
    WHERE L.PREVIOUS_OBJECT_ID = 3  -- Application id
    AND L.LINK_TYPE_ID = 0 -- Application Functional Module
    AND L.SNAPSHOT_ID = <snapshot_id>;

    If this returns a value, then the links is there.  If not, then:

    • Run the following query on the central database:

      SELECT *
      FROM   dss_objects
      WHERE  object_type_id=20000;

      This will normally return something like this where the first column is the module id - the functional module we are looking for in this case is the one with union content (in this case 4):

      4;20000;"___APP1 union content___";"";"___APP1 union content___"
      
      5;20000;"MOD1";"";”MOD1"
      
      
    • Next, create the link by using the object_ids of the application and the application functional module with the following command (3 and 4 in our case;  order is important – the object_id of the application should be first):

      SELECT DSS_CREATE_LINK(3,4,0,1); -- (<object_id of application>, <object_id of functional module>, 0, 1)

      There's no significant value returned by this query.

  • Next check if the link between the technologies is missing, by running the following query on the central database using the application id obtained in the above query for the previous_object_id field and the snapshot_id (see the following tkb page if you need help determining this value:  SQL Queries - CAST Central Base - Queries on snapshots - How to get the ID and name of a snapshot for a given application):

    SELECT * FROM DSS_LINK_INFO L
    JOIN DSS_OBJECTS O
    ON O.OBJECT_ID = L.NEXT_OBJECT_ID
    WHERE L.PREVIOUS_OBJECT_ID = 3  -- Application id
    AND L.LINK_TYPE_ID = 2 -- technologies
    AND L.SNAPSHOT_ID = <snapshot_id>;

    This will normally return something like where the application object_id for the technology is the fifth column:

    1;3;50518;2;50518;1101000;"SQL";"Technologic SQL object";"SQL"
    1;3;50519;2;50519;-4;"Cobol";"Technologic Cobol object";"Cobol"
  • Then run the following query on the central database using the module id obtained in the above query for the previous_object_id field and the snapshot_id (see the following tkb page if you need help determining this value:  SQL Queries - CAST Central Base - Queries on snapshots - How to get the ID and name of a snapshot for a given application):

    SELECT * FROM DSS_LINK_INFO L
    JOIN DSS_OBJECTS O
    ON O.OBJECT_ID = L.NEXT_OBJECT_ID
    WHERE L.PREVIOUS_OBJECT_ID = 4  -- Functional Module id
    AND L.LINK_TYPE_ID = 2 -- technologies
    AND L.SNAPSHOT_ID = <snapshot_id>;

    This will normally return something like where the module object_id for the technology is the fifth column

    1;4;50506;2;50506;1101000;"SQL";"Technologic SQL object";"SQL"
    1;4;50507;2;50507;-4;"Cobol";"Technologic Cobol object";"Cobol"
  • Then with using the application object_id and module object_id for the same technologies (such as 'SQL' above - 50518 for the application object_id for the technology and 50506 for the module object_id for the application) run the following query - this would have to be done on all technologies (see the following tkb page if you need help determining the snapshot_id value:  SQL Queries - CAST Central Base - Queries on snapshots - How to get the ID and name of a snapshot for a given application)

    SELECT * FROM DSS_LINK_INFO L
    JOIN DSS_OBJECTS O
    ON O.OBJECT_ID = L.NEXT_OBJECT_ID
    WHERE L.PREVIOUS_OBJECT_ID = 50518  -- Application technology Id
    AND L.NEXT_OBJECT_ID = 50506  -- Module technology Id
    AND L.LINK_TYPE_ID = 0
    AND L.SNAPSHOT_ID = <snapshot_id>;
  • If this query returns a result, then the link is there.  if it does not, then create it with the following query

    SELECT DSS_CREATE_LINK(50518,50506,0,1); -- (<application object_id for the technology>, <module object_id for the technology>, 0, 1)

    There's no significant value returned by this query.

Notes/comments


Related Pages