Database Sequence Pointers for Zero Downtime Upgrades

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database upgrade procedures face challenges in handling tables with sequence fields, leading to duplicate numbers and difficulties in preserving sequence field values during upgrades, especially when deploying new software in parallel to old software with minimal downtime.

Innovation Solution

The solution involves enabling concurrent access to sequences across different access schemas using sequence pointers and table links, allowing for the creation of application triggers that manage updates and inserts, and utilizing external sequences to ensure sequence consistency across tables during the upgrade process.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If upgrade procedures create clones of tables and run database triggers to replicate data from production to upgrade copy, then minimal downtime is achieved, but duplicate numbers are generated in sequence fields

Engineering Contradiction:
ImprovedowntimeVSAvoidsequence field uniqueness
Core Design Contradiction:
Loss of timeVSManufacturing precision

Solution Approach 1:

The patent segments the sequence management by creating separate sequence pointers for the production schema and upgrade schema. Each schema maintains its own sequence pointer (PROD_SEQUENCE_PTR and UPGRADE_SEQUENCE_PTR) that independently tracks sequence values, preventing duplicates while enabling parallel operations in both schemas during the upgrade process.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces sequence pointers as intermediary objects that mediate between the production and upgrade schemas. These pointers act as intermediaries that manage sequence value generation, ensuring that both schemas can operate concurrently without generating duplicate sequence numbers by coordinating through the pointer mechanism.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Stability of the object's composition

If one sequence is used for both old table and new table during upgrade, then sequence consistency is maintained, but concurrent access between different access schemas becomes problematic

Engineering Contradiction:
Improvesequence consistencyVSAvoidconcurrent access capability
Core Design Contradiction:
Stability of the object's compositionVSAdaptability or versatility

Solution Approach 1:

The patent segments the single sequence into multiple sequence pointers, each associated with a specific access schema. The production schema has PROD_SEQUENCE_PTR while the upgrade schema has UPGRADE_SEQUENCE_PTR, allowing each schema to independently manage its sequence values while maintaining overall consistency through coordinated pointer management.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent adds a schema dimension to sequence access by creating sequence pointers that are schema-specific. Instead of a flat single-sequence model, the system introduces a schema-level dimension where each access schema has its own pointer to the underlying sequence, enabling concurrent access while preserving consistency.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Productivity

If tables are cloned for upgrade procedures, then parallel operation is enabled, but memory consumption increases due to data duplication

Engineering Contradiction:
Improveparallel operation capabilityVSAvoidmemory consumption
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent uses selective copying by creating sequence pointers that reference the underlying sequence rather than duplicating entire table structures. The upgrade schema clones only the necessary metadata and structure definitions while sharing the actual data storage through the pointer mechanism, reducing memory consumption compared to full table cloning.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent makes the underlying sequence table multi-functional by allowing it to serve both production and upgrade schemas simultaneously through different pointers. The same physical sequence table fulfills multiple roles, eliminating the need for separate sequence storage for each schema and thereby reducing overall memory consumption.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS9898494B2Zero downtime upgrade for database applications using tables with sequences
Publication Date: 2018.02.20 SAP SE
  • US9898494B2 patent drawing
  • US9898494B2 patent drawing
  • US9898494B2 patent drawing

AI summary

An upgrade of a first version of a database application to a second version of a database application that both have a same data schema is initiated. The first database application has a first access schema such that at least one table in the data schema is linked to the first access schema. The second version of the database application has a second access schema such that at least one database table in the data schema is linked to the second access schema. The first access schema differs from the second access schema. Concurrent access is provided for each access schema to at least one sequence in the data schema to both the first version of the database application and the second version of the database application. Related apparatus, systems, techniques and articles are also described.