Unified Application Database Context Correlation for Debugging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current profiling and tuning tools for application code are disconnected from those for relational database management systems (RDBMSs), making it difficult for developers to identify and fix issues like deadlocks in database applications, as they lack integration and correlation of application and database contexts.

Innovation Solution

An infrastructure that captures and correlates both application and database contexts through server tracing, data access layer tracing, and application tracing, generating a unified log file for post-processing to provide a single view of application and database profiles, enabling effective debugging and tuning.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If developers use separate profiling tools for application code and database management systems, then each tool can provide detailed information about its specific context, but the information from both tools remains disconnected and difficult to correlate

Engineering Contradiction:
Improveprofiling information detailVSAvoidcontext correlation
Core Design Contradiction:
Measurement precisionVSLoss of information

Solution Approach 1:

The patent combines separate application profiling tools and database profiling tools into a unified profiling system. The system integrates application code profiling with database statement profiling, allowing developers to view both application context and database context in a single correlated view. This merging eliminates the information loss that occurs when using separate disconnected tools.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent introduces an intermediary correlation mechanism that links application code execution with database statement execution. The system uses statement identifiers and timing information as intermediaries to correlate events from the application layer with events from the database layer, enabling developers to trace the complete execution path from application code to database operations.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If developers examine DBMS profiler output to detect deadlocks, then they can identify that deadlocks occurred, but they cannot easily determine which application functions issued the statements that caused the deadlock

Engineering Contradiction:
Improvedeadlock detectionVSAvoidapplication code identification
Core Design Contradiction:
ReliabilityVSDifficulty of detecting and measuring

Solution Approach 1:

The patent merges application profiling data with database profiling data in a unified view. When a deadlock is detected, the system correlates the database statement information with the corresponding application code information, allowing developers to see both the deadlock details and the specific application functions that issued the problematic statements in the same view.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The system provides feedback by automatically tracing and displaying the application code path that leads to database statements involved in deadlocks. When a deadlock is detected at the database level, the profiling system feeds back the corresponding application context information, enabling developers to identify the root cause in the application code without manual correlation effort.

Inventive Principle:
Principle #23Feedback

3Productivity

If developers use integrated profiling that captures both application and database contexts, then debugging effort is reduced, but the system complexity and data processing requirements increase

Engineering Contradiction:
Improvedebugging efficiencyVSAvoidprofiling infrastructure
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the profiling infrastructure into distinct but integrated components: application code profiling, database statement profiling, and correlation processing. Each component handles specific tasks independently, but they work together through standardized interfaces. This segmentation manages complexity by breaking down the integrated system into manageable, specialized modules.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS8307343B2Application and database context correlation for database application developers
Publication Date: 2012.11.06 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8307343B2 patent drawing
  • US8307343B2 patent drawing
  • US8307343B2 patent drawing

AI summary

Infrastructure for capturing and correlating application context and database context for tuning, profiling and debugging tasks. The application context can include events such as data access events, and the database context can include events such as database server events. The events can be obtained from server tracing, data access layer tracing, and/or application tracing and written into respective log files. A data access event can indicate that an application consumed a row from a result set returned from a DBMS query. A post-processing step can correlate the application and database contexts by tokenizing strings and computing intersections between the tokenized strings. A tool inside a development environment may also suggest a query hint for the database or a data access API for the application based on the correlated context.