CSharpDB.Storage.Diagnostics
2.8.0
Prefix Reserved
See the version list below for details.
dotnet add package CSharpDB.Storage.Diagnostics --version 2.8.0
NuGet\Install-Package CSharpDB.Storage.Diagnostics -Version 2.8.0
<PackageReference Include="CSharpDB.Storage.Diagnostics" Version="2.8.0" />
<PackageVersion Include="CSharpDB.Storage.Diagnostics" Version="2.8.0" />
<PackageReference Include="CSharpDB.Storage.Diagnostics" />
paket add CSharpDB.Storage.Diagnostics --version 2.8.0
#r "nuget: CSharpDB.Storage.Diagnostics, 2.8.0"
#:package CSharpDB.Storage.Diagnostics@2.8.0
#addin nuget:?package=CSharpDB.Storage.Diagnostics&version=2.8.0
#tool nuget:?package=CSharpDB.Storage.Diagnostics&version=2.8.0
CSharpDB.Storage.Diagnostics
Read-only storage diagnostics and integrity checking toolkit for CSharpDB database files.
Overview
CSharpDB.Storage.Diagnostics provides read-only inspection and integrity verification for CSharpDB database files, WAL files, and indexes. Use it to validate database health, diagnose corruption, inspect page layouts, and verify index consistency. All operations are non-destructive and safe to run on production databases.
Key Types
| Type | Description |
|---|---|
DatabaseInspector |
Inspects database files: validates headers, walks B+trees, produces page-type histograms, and reports issues |
WalInspector |
Validates WAL files: header checks, frame-by-frame validation (salt, checksums), commit marker detection |
IndexInspector |
Verifies index integrity: root page validity, table/column existence, B+tree reachability |
DatabaseInspectReport |
Report model with header info, page histogram, scanned pages, and issue list |
Usage
Database Inspection
using CSharpDB.Storage.Diagnostics;
// Full database inspection
var report = await DatabaseInspector.InspectAsync("mydb.db");
Console.WriteLine($"Pages scanned: {report.PageCountScanned}");
Console.WriteLine($"Issues found: {report.Issues.Count}");
foreach (var issue in report.Issues)
{
Console.WriteLine($" [{issue.Severity}] {issue.Message}");
}
// Inspect a specific page
var page = await DatabaseInspector.InspectPageAsync("mydb.db", pageId: 3, includeHex: true);
WAL Inspection
// Validate WAL integrity
var walReport = await WalInspector.InspectAsync("mydb.db");
// Check for frame validation errors, salt mismatches, checksum failures
Index Verification
// Verify an index is consistent with its table
var indexReport = await IndexInspector.CheckAsync("mydb.db", "idx_users_email", sampleSize: 100);
Installation
dotnet add package CSharpDB.Storage.Diagnostics
For the recommended all-in-one package:
dotnet add package CSharpDB
Dependencies
CSharpDB.Primitives- shared type systemCSharpDB.Storage- storage engine types and page format definitions
Related Packages
| Package | Description |
|---|---|
| CSharpDB.Storage | The storage engine this package inspects |
| CSharpDB.Client | Client SDK surface that exposes diagnostics for direct and remote consumers |
License
MIT - see LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- CSharpDB.Primitives (>= 2.8.0)
- CSharpDB.Storage (>= 2.8.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on CSharpDB.Storage.Diagnostics:
| Package | Downloads |
|---|---|
|
CSharpDB.Engine
Lightweight embedded SQL database engine for .NET. Single-file storage, WAL durability, concurrent readers, and a typed Collection<T> NoSQL API. |
|
|
CSharpDB
All-in-one package for CSharpDB application development. Includes the unified client, engine, ADO.NET provider, and diagnostics. |
|
|
CSharpDB.Client
Unified CSharpDB client SDK with pluggable transports (Direct, HTTP, gRPC, TCP, Named Pipes). |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.9.1 | 0 | 4/7/2026 |
| 2.8.1 | 34 | 4/6/2026 |
| 2.8.0 | 38 | 4/4/2026 |
| 2.7.0 | 104 | 3/31/2026 |
| 2.6.0 | 106 | 3/29/2026 |
| 2.5.0 | 200 | 3/28/2026 |
| 2.4.0 | 105 | 3/24/2026 |
| 2.3.0 | 104 | 3/22/2026 |
| 2.2.0 | 101 | 3/21/2026 |
| 2.0.1 | 116 | 3/14/2026 |
| 2.0.0 | 108 | 3/13/2026 |
| 1.9.0 | 120 | 3/12/2026 |
| 1.8.0 | 123 | 3/11/2026 |
| 1.7.0 | 109 | 3/8/2026 |
| 1.6.0 | 96 | 3/8/2026 |
| 1.5.0 | 99 | 3/7/2026 |
| 1.4.0 | 98 | 3/7/2026 |
| 1.3.0 | 98 | 3/6/2026 |
| 1.2.0 | 91 | 3/5/2026 |
| 1.1.0 | 93 | 3/4/2026 |