A web-based SQL Server database exploration and profiling tool that helps database administrators, developers, and analysts quickly understand database structure, generate schema scripts, and analyze data quality.
Database Profiler provides a streamlined workflow for exploring SQL Server databases without writing queries. The application offers four core capabilities:
- Schema Discovery - Browse database objects, tables, columns, and relationships
- Relationship Mapping - Visualize foreign key relationships and generate ERD exports
- Script Generation - Export
CREATE TABLEscripts and schema definitions - Data Profiling - Analyze column statistics, data quality, and value distributions
- π Interactive Schema Browser - Navigate database objects with a clean, intuitive interface
- π Relationship Browser - Explore explicit and suggested foreign key relationships between tables
- π Automated Data Profiling - Statistical analysis including nulls, distinct counts, min/max values, and frequency distributions
- π Script Export - Generate production-ready
CREATE TABLEscripts - πΊοΈ ERD Generation - Export Entity-Relationship Diagrams in SQL DDL and Mermaid formats
- π Excel Reporting - Comprehensive table and relationship reports with hyperlinked navigation
- π¨ Theme Support - Light, dark, and ocean color themes
- β‘ V3 Optimized Stored Procedure - 30-40% faster profiling with the included
usp_ProfileTable_v3_OPTIMIZEDstored procedure
Database Profiler follows a simple, guided workflow:
Start by connecting to your SQL Server instance and selecting a database to explore.
Click the down-arrow to the right of the Tables, Views, Functions or Stored Procedures section to view lists of objects.
Screenshot placeholder: Object Browser showing choice of Tables, Views, Functions or Stored Procedures
Screenshot placeholder: Object Browser showing list of tables
- View names and schemas
Select a table to view detailed column information:
- Column names and data types
- Nullability
- Default values
- Identity columns
- Computed columns
- Extended column descriptions
From here you can:
- Generate
CREATE TABLEscripts - Navigate to data profiling
Screenshot placeholder: Column Browser showing table columns
Analyze actual data in the selected table:
- Count Statistics - Total rows, null counts, distinct values
- Numeric Analysis - Min, average, max, standard deviation
- Text Analysis - Min/max/average length
- Date Analysis - Earliest and latest dates
- Value Frequency - Most common values with counts and percentages
- ID Column Detection - Automatic handling of identifier columns
Screenshot placeholder: Data Profiling page showing column statistics
Explore table relationships and database structure:
- Explicit Relationships - Foreign keys defined in the database schema
- Suggested Relationships - Automatically detected potential relationships based on column naming patterns
- Relationship Details - View parent/child tables, columns, cardinality, and cascade rules
- Interactive Navigation - Click table names to jump to their column definitions or profiles
From the Relationships page you can:
- Filter by specific tables or schemas
- Navigate to related tables
- Generate relationship reports
Screenshot placeholder: Relationships Browser showing foreign key relationships
Generate comprehensive Excel workbooks for multiple report types:
- Summary Sheet - Database overview with hyperlinked table navigation
- Detail Sheets - Per-table analysis with full profiling results
- Hyperlinked Navigation - Jump between summary and detail sheets
- Professional Formatting - Styled headers, banded rows, and freeze panes
- Relationship Overview - All explicit and suggested relationships in a single workbook
- Detailed Metadata - Parent/child tables, columns, cardinality, cascade rules, and constraint names
- Excel Export - Professional formatting with frozen header rows and auto-sized columns
Report Confirmation Page:
Screenshot placeholder: Reports confirmation page showing selected tables
Sample Excel Report:
Screenshot placeholder: Excel report showing summary and detail sheets
Generate ERD diagrams for documentation and analysis:
- SQL DDL Export - Production-ready
CREATE TABLEstatements with foreign key constraints - Mermaid Diagram Export - Markdown-based ERD diagrams compatible with GitHub, documentation tools, and Mermaid renderers
- Table Selection - Choose specific tables to include in the diagram
- Relationship Options - Include explicit foreign keys and/or suggested relationships
- Multi-Format Download - Export both formats simultaneously or individually
Screenshot placeholder: ERD export page with table selection and format options
- Framework: ASP.NET Core Razor Pages (.NET 10)
- Database: SQL Server 2016 or later
- UI: Bootstrap 5 with custom theming
- Excel Generation: Open XML SDK
- Background Processing: Hosted service with in-memory queue
- .NET 10 SDK
- SQL Server 2016 or later
- Windows, Linux, or macOS
-
Clone the repository:
git clone https://github.com/yourusername/DatabaseProfiler-VS.git cd DatabaseProfiler-VS -
(Optional but Recommended) Deploy the V3 stored procedure for better performance:
π‘ Performance Optimization for DBAs
Deploy theusp_ProfileTablestored procedure to get 30-40% faster profiling.
This is optional - the application automatically falls back to dynamic SQL if the procedure isn't found.
No errors, no downtime!Quick Deploy:
- Open the file:
DatabaseProfiler.App/Docs/usp_ProfileTable_v3_OPTIMIZED.sql - Run it in SSMS on your target database(s)
- That's it! The app will automatically detect and use it.
- Open the file:
-
Configure connection settings in
appsettings.json(optional - can also connect via UI):{ "TableProfiling": { "DefaultSampleSize": 1000000, "DefaultTimeout": 300 } } -
Run the application:
cd DatabaseProfiler.App dotnet run -
Navigate to
https://localhost:5001in your browser
βΉοΈ Note: You can start using the application immediately without deploying the stored procedure.
Profile data will work right away using the built-in dynamic SQL approach.
Deploy the stored procedure later when you're ready for optimized performance.
Configure profiling behavior in appsettings.json:
{
"TableProfiling": {
"DefaultSampleSize": 1000000,
"DefaultTimeout": 300,
"DefaultFrequentValueLimit": 10
}
}- SQL Server Authentication (username/password)
- Windows Authentication (trusted connection)
- Credentials are session-based and never persisted
For production deployment, see Deployment Guide for:
- IIS configuration
- Application pool settings
- Timeout configuration for long-running reports
Additional documentation is available in the DatabaseProfiler.App/Docs/ folder:
- Deployment Guide - Production deployment settings
- Schema and Profile Design - Architecture documentation
- Field Reference - Complete field catalog
- V3 Implementation Notes - Performance optimization details
- Presentation Layer: Razor Pages with server-side rendering
- Service Layer:
SchemaDiscoveryService- Database metadata and relationship discoveryTableProfilingService- Data analysis and statisticsTableReportService- Excel table report generationRelationshipReportService- Excel relationship report generationErdGenerationService- ERD export in SQL DDL and Mermaid formats
- Background Processing: Report queue with progress tracking
- Session State: Connection context and user selections
The V3 stored procedure (usp_ProfileTable_v3_OPTIMIZED) provides:
- 30-40% faster profiling compared to dynamic SQL
- Efficient varchar tracking with configurable sample sizes
- Optimized frequent value detection
- Reduced memory overhead
Contributions are welcome! Please feel free to submit issues or pull requests.
[Your License Here]
For questions or issues, please open a GitHub issue or contact [your contact information].
Built with β€οΈ using ASP.NET Core and SQL Server