Summary of the DBO.updateConnections Procedure

The DBO.updateConnections procedure is designed to efficiently refresh and update several key tables (connections, accesses, and connectionsLineIDs) in the database with new data. The procedure performs the following actions:

  1. Initialization:

    • Truncates the interim tables (ACCESSENEW, CONNECTIONSNEW, CONNECTIONSLINEIDSNEW) to clear out any existing data.
  2. Data Insertion:

    • Inserts new data into the interim tables using complex SQL queries. These queries calculate fields such as connection IDs, monetary values, business unit IDs, and activity statuses, ensuring that only relevant and correctly calculated data is included.
  3. External Circuit ID Integration:

    • Merges data from the EXTERNALCIRCUITID table into CONNECTIONSNEW to add external circuit IDs where applicable.
  4. Activity Status Updates:

    • Updates the ACC_ACTIVE status in the ACCESSENEW table to reflect the correct activity status based on current conditions, including handling active, inactive, and terminated lines.
  5. Table Replacement:

    • Uses the DBMS_REDEFINITION package to perform an in-place replacement of the original tables (connections, accesses, and connectionsLineIDs) with their corresponding new tables (connectionsnew, accessesnew, connectionsLineIDsnew). This process is done without invalidating dependent PL/SQL objects, such as triggers, constraints, and indexes.
  6. Finalization:

    • Completes the update process by ensuring all dependent objects are correctly associated with the new tables and that all data is committed and the job is marked as complete.

This procedure is carefully designed to handle large volumes of data efficiently while ensuring the integrity and consistency of the database schema and its associated objects.

Was this page helpful?