Server Session Context Preservation for Database Recovery

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing client-server systems fail to effectively recover and re-submit database commands in a new session after a database session failure, leading to incomplete transactions, data loss, and user frustration due to environmental differences between server instances, resulting in incorrect results or data corruption.

Innovation Solution

Preserving and reusing the session context, including server-side environment information and transaction states, to ensure compatibility and correctness when re-executing commands in a new session, allowing for accurate replay and completion of transactions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the client reconnects to a different server instance after a connection failure, then the client can resume sending commands, but the new server instance has different environment settings that cause incorrect command execution and data corruption

Engineering Contradiction:
Improvesession continuityVSAvoidserver instance compatibility
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent captures and stores a snapshot of the server-side environment context (including database version, optimizer settings, NLS parameters, and other configuration details) from the original server instance. This context snapshot is then transmitted to the client, which includes it in subsequent connection requests. When connecting to a new server instance, the client provides this context snapshot, allowing the new instance to adjust its environment to match the original, ensuring consistent command execution across different server instances.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent dynamically adjusts server instance environment parameters based on the provided context snapshot. When a new server instance receives the context information, it modifies its runtime parameters (such as optimizer settings, NLS parameters, and database configuration) to match the captured environment from the original server. This parameter adjustment ensures that commands execute with the same environmental conditions regardless of which server instance is handling the connection.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If the client stores and transmits detailed server environment context information, then command execution consistency is improved, but network bandwidth consumption and communication overhead increase

Engineering Contradiction:
Improvecommand execution consistencyVSAvoidnetwork bandwidth
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The patent extracts only the essential environment context parameters needed for command execution consistency, rather than transmitting the entire server configuration. The context snapshot includes specifically the database version, optimizer settings, NLS parameters, and other critical configuration details that directly affect command execution. Non-essential parameters are omitted, reducing the size of transmitted data while maintaining execution consistency.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The context snapshot structure is designed to be universally applicable across different server instances and connection scenarios. The same context format serves multiple purposes: it enables environment matching for command consistency, provides diagnostic information for troubleshooting, and can be reused across multiple connections without regeneration. This multi-functionality reduces the need for repeated transmissions of redundant information.

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

3Measurement precision

If the system captures and manages detailed session context information, then session recovery accuracy is improved, but system complexity and implementation difficulty increase

Engineering Contradiction:
Improvesession state accuracyVSAvoidcontext management system
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent captures the server environment context snapshot at the beginning of the session or at predetermined checkpoints, before the client may disconnect. This preliminary capture ensures that the context information is already available and formatted correctly when needed for reconnection, eliminating the need for complex real-time context synchronization or reconstruction mechanisms during recovery.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements selective retention and discarding of context information based on session state and command type. Not all environment parameters are preserved for every session - the system identifies and retains only those parameters relevant to the specific client's workload and the server configuration. This selective approach reduces the burden of managing and transmitting unnecessary context data while maintaining accuracy for critical parameters.

Inventive Principle:
Principle #34Discarding and recovering

Data Source

PatentUS9600371B2Preserving server-client session context
Publication Date: 2017.03.21 ORACLE INT CORP
  • US9600371B2 patent drawing
  • US9600371B2 patent drawing
  • US9600371B2 patent drawing

AI summary

Methods, devices, and storage media are provided for preserving the context of a server-client session. A server generates an initial context and a context for each user command executed in a first session and sends context to a client with the return for each command. The context describes software, session state, returned data, and/or hardware characteristics of a server-side environment for the first session. The client receives and stores the context with each user command. Upon determining that the database session should be rebuilt in the second session, the client sends initial context. A server for the second session receives the initial context and determines whether commands should be replayed in the second session. If commands are replayed, the server validates that server environment and client-visible results for each command in the second session match that from execution in the first session using the context for that command.