Skip to content

chanman4821/SQLDump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQLDump Analyzer v3.0

A professional tool for analyzing SQL Server crash dump files with Azure AI integration.

Features

  • Parse Dump Files: Read and analyze SQL Server minidump (.mdmp, .dmp) files
  • Rich Knowledge Base: Preloaded explanations for:
    • Exception codes (ACCESS_VIOLATION, STACK_OVERFLOW, etc.)
    • SQL Server error codes (605, 823, 824, 17883, etc.)
    • Wait types (PAGEIOLATCH_, LCK_M_, CXPACKET, etc.)
    • Module/DLL meanings (sqlservr.exe, sqlmin.dll, etc.)
  • WinDbg Integration: Automated analysis using cdb.exe (if installed)
  • Azure AI Foundry Integration: Get intelligent, contextual explanations using AI

Quick Start

# Clone the repo
git clone https://github.com/chanman4821/SQLDump.git
cd SQLDump

# Install dependencies (optional - for AI features)
pip install -r requirements.txt

# Run the GUI
python run_gui.py

Screenshots

When you open a dump file, you'll see:

  1. Overview Tab: Parsed dump info with explanations

    • File information
    • Exception details with "What this means" explanations
    • Common causes
    • Recommended next steps
  2. WinDbg Analysis Tab: Detailed stack traces (requires Windows Debugging Tools)

  3. AI Analysis Tab: Get intelligent analysis from Azure AI Foundry

    • Ask questions about your dump
    • Get root cause analysis
    • Receive actionable recommendations
  4. Reference Panel:

    • Search SQL error codes by number
    • Look up wait types with explanations

Knowledge Base

The tool comes with a comprehensive preloaded knowledge base:

Exception Codes

Code Name What It Means
0xC0000005 ACCESS_VIOLATION Memory access violation - SQL Server tried to access memory it shouldn't
0xC00000FD STACK_OVERFLOW Stack overflow from infinite recursion or deep call chains
0xE06D7363 CPP_EXCEPTION C++ exception thrown and not caught
0x80000003 BREAKPOINT Debugger breakpoint or internal assertion

SQL Server Errors

Error Name Category
605 Page Retrieval Failed Database Corruption
823 OS I/O Error I/O Error
824 Logical I/O Error I/O Error
17883 Non-Yielding Scheduler Scheduler

Wait Types

Wait Type Category Description
PAGEIOLATCH_* I/O Waiting to read pages from disk
WRITELOG I/O Transaction log writes
LCK_M_* Locking Lock acquisition waits
CXPACKET Parallelism Parallel query coordination

Azure AI Integration

To enable AI-powered analysis:

  1. Go to Azure Portal → AI Foundry
  2. Create a project and deploy a model (gpt-4o recommended)
  3. In the app, go to Settings → Configure Azure AI
  4. Enter your endpoint URL and API key

Or set environment variables:

$env:AZURE_AI_ENDPOINT = "https://your-endpoint.openai.azure.com/"
$env:AZURE_API_KEY = "your-api-key"
$env:AZURE_AI_MODEL = "gpt-4o"  # optional

Requirements

  • Python 3.8+
  • Windows (for WinDbg integration)
  • Optional: Windows Debugging Tools (for detailed stack traces)
  • Optional: Azure AI Foundry subscription (for AI analysis)

Installation

Windows Debugging Tools

For detailed stack trace analysis, install cdb.exe:

  1. Download Windows SDK
  2. During install, select "Debugging Tools for Windows"
  3. Restart the app - it will auto-detect cdb.exe

Azure AI SDK

pip install azure-ai-inference azure-core

Usage

GUI Mode

python run_gui.py

CLI Mode

python run_cli.py path/to/dump.mdmp

Project Structure

SQLDump/
├── run_gui.py          # GUI entry point
├── run_cli.py          # CLI entry point
├── requirements.txt    # Python dependencies
├── sqldump/
│   ├── __init__.py     # Package init
│   ├── analyzer.py     # Core dump parsing
│   ├── windbg.py       # WinDbg/cdb.exe integration
│   ├── knowledge_base.py  # Preloaded reference data
│   ├── ai_analyzer.py  # Azure AI integration
│   ├── gui.py          # Main GUI application
│   └── errors.py       # Legacy error definitions

Contributing

Pull requests welcome! Please ensure:

  • Code follows existing style
  • New features include documentation
  • Knowledge base additions include explanations

License

MIT License - Free to use and modify

Support

For SQL Server crash dump issues:

  • Use this tool for initial analysis
  • Check Microsoft documentation
  • Contact Microsoft Support for critical issues

For tool issues:

  • Open a GitHub issue
  • Include Python version and error message

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages