Interface & Features — SQL Server Auditor
Walk through the main screens, tabs, and controls you will use day to day.
Dashboard Tab
The Dashboard is the home screen of the UI. It provides a real-time health overview of all monitored instances and visual analytics of audit activity.
Health Panel
At the top of the dashboard, a health indicator shows the status of each registered instance (Collecting, Stopped, Error). The panel also shows the total event count, alert count, and last collection timestamp.
Charts
- Events by Category — Bar chart showing DML, DDL, Security, Login, and other category counts across all instances.
- Events by Hour — Line chart showing event volume over the last 24 hours for pattern analysis.
Instance Management
From the dashboard you can:
- Register Instance — Add a new SQL Server instance to monitor. Enter server name, authentication method, and optional display name.
- Configure Instance — Open the Configure tab pre-selected for a specific instance.
- Start / Stop Instance — Start or stop the audit session on a specific instance.
- Delete Instance — Remove a registered instance and optionally delete its audit data.
Auto-Refresh
The dashboard refreshes automatically at a configurable interval (default: 30 seconds). The refresh timer is shown in the toolbar. You can also click Refresh to update immediately.
Events Tab
The Events tab displays all collected audit events with powerful filtering and search capabilities.
Event Grid
Audit events are displayed in a scrollable DataGrid with the following columns: Time, Event Type, Category, Server, Database, Login, Statement (truncated), Duration, and Severity. Click any row to open the event detail panel.
Event Detail Panel
A resizable side panel shows all properties of the selected event, including the full SQL statement text, execution metrics (CPU, I/O, duration), client information, and any associated alert.
Search & Filter
The Events tab provides multiple filtering options that work together:
| Filter | Description |
|---|---|
| Search Text | Free-text search across statement, event type, login, database, and object columns |
| Time Range | From/To date-time pickers to narrow by time window (Quick: Last Hour, 24h, 7d, 30d) |
| Server | Dropdown to filter by registered SQL Server instance |
| Database | Dropdown populated from collected events |
| Login | Dropdown populated from collected events |
| Event Types | Multi-select popup with 14 event types and Check All / Uncheck All buttons |
Export from Events
| Format | Description |
|---|---|
| CSV | Comma-separated values with all event columns. Opens in Excel, Google Sheets, etc. |
| Formatted PDF report with header, summary statistics, and event table. |
Configure Audit Tab
The Configure tab allows you to set up per-instance audit policies. Select an instance from the dropdown, then configure which events to capture and how.
Event Selection
Events are organized into three groups with individual toggle checkboxes:
- DML (Data Manipulation) — SELECT, INSERT, UPDATE, DELETE tracking with minimum duration filter
- DDL (Data Definition) — CREATE, ALTER, DROP on tables, views, procedures, and other objects
- Security — Login/Logout, Failed Logins, Permission changes (GRANT, DENY, REVOKE), Role changes, Server configuration
Session Settings
| Setting | Description | Default |
|---|---|---|
| Buffer Size (MB) | Memory allocated for the event capture buffer | 64 |
| Max Events in Buffer | Maximum events retained in the buffer before flush | 50000 |
| Collection Interval (sec) | How often collected events are written to the central database | 30 |
| Continuous Capture Mode | Use continuous capture to ensure no events are lost during collection cycles | Enabled |
Event Categories
| Category | What It Tracks | Purpose |
|---|---|---|
| Login & Authentication | Successful logins, logouts, and failed login attempts | Track all login/logout activity and failed login attempts |
| DDL & Schema Changes | Object creation, alteration, and deletion | Monitor CREATE, ALTER, DROP operations on tables, procedures, views |
| Security & Permissions | User/role changes, permission grants, denials, revocations | Track GRANT, DENY, REVOKE and user/role modifications |
| DML Query Tracking | Executed queries and stored procedure calls | Capture executed queries with duration and resource usage |
| Database Management | Database-level operations and backup/restore activity | Track database-level operations and backup/restore activity |
| Server Configuration | Server-level configuration changes and critical errors | Monitor server-level configuration changes and critical errors |
| Data Access & Sensitivity | Read and write operations on sensitive objects | Track SELECT/INSERT/UPDATE/DELETE on sensitive objects |
Filters
Narrow the scope of captured events using optional per-instance filters:
| Filter | Description |
|---|---|
| Database | Only capture events from a specific database |
| Login Name | Only capture events from a specific login |
| Host Name | Only capture events from a specific client machine |
| Application | Only capture events from a specific application (app_name) |
| Exclude System Logins | Filter out sa, NT AUTHORITY, and system session IDs ≤ 50 |
| Min Duration (ms) | Only capture DML events that exceed a minimum execution duration |
Apply Configuration
After making changes, click Save & Apply. The collector service will pick up the new configuration on its next collection cycle and recreate the audit session with the updated settings.
Alerts Tab
The Alerts tab displays security-relevant alerts generated automatically by the collector service and AI analysis.
Alert Grid
Alerts are displayed with the following information:
- Severity — Critical (red), Warning (yellow), Info (blue)
- Title — Brief description of the alert
- Server / Database — Where the alert originated
- Time — When the alert was raised
- Acknowledged — Whether an operator has acknowledged the alert
Alert Workflow
- Alerts are generated automatically based on event patterns (e.g., multiple failed logins, privilege escalation, off-hours DDL changes)
- Unacknowledged alerts show a badge count on the Alerts tab header
- Click an alert row to view details, then click Acknowledge to mark it as reviewed
- Use Acknowledge All to bulk-acknowledge all visible alerts
- Toggle Show Acknowledged to include or hide previously acknowledged alerts
Alert Types
| Alert | Severity | Trigger |
|---|---|---|
| Multiple Failed Logins | Critical | 5+ failed logins from the same source within 5 minutes |
| Privilege Escalation | Critical | GRANT of sysadmin or db_owner roles |
| Schema Change (Production) | Warning | DDL operation on a database tagged as production |
| Off-Hours Access | Warning | Login activity outside of configured business hours |
| Sensitive Data Access | Info | SELECT on tables tagged as sensitive |
| Collector Health | Warning | Collector service failed to collect from an instance for 3+ cycles |
Compliance Reports Tab
Generate professional PDF compliance reports with a single click. Four pre-built report types cover common regulatory requirements.
Report Types
| Report | Contents | Use Case |
|---|---|---|
| Sensitive Data Access | All SELECT, INSERT, UPDATE, DELETE events on monitored tables with user, timestamp, statement text, and row counts | GDPR, HIPAA — Who accessed what data and when |
| Permission Changes | GRANT, DENY, REVOKE actions plus role membership changes with before/after state | SOX, PCI DSS — Track privilege escalations and access control changes |
| Schema Changes | All CREATE, ALTER, DROP operations with the responsible user, object type, and full DDL statement | Change management, audit trail for schema modifications |
| Failed Logins | All failed login attempts with source IP, login name, timestamp, and failure reason | Security review, brute-force detection, PCI DSS authentication monitoring |
Report Configuration
- Period — Select the reporting window: Last 7 days, 30 days, 90 days, or 365 days
- Format — PDF (generated using PdfSharpCore with styled headers, tables, and summary statistics)
- Output — Save dialog opens automatically after generation. Reports include a cover page with generation timestamp, period, and instance scope.
AI-Powered Security Insights
The AI Insights panel is a slide-out drawer on the right side of the main window. It uses the OpenAI API to analyze your audit data and provide automated security intelligence.
Opening AI Insights
Click the AI button in the header bar to toggle the AI drawer panel (380px wide). The panel slides out from the right without navigating away from your current tab.
Analysis Types
| Analysis | Description |
|---|---|
| Security Summary | High-level overview of your audit posture — event counts by category, top users, top databases, and key risk indicators |
| Anomaly Detection | Identifies unusual patterns such as off-hours access, bulk data operations, new login sources, and privilege changes |
| Threat Analysis | Assesses brute-force attempts, potential SQL injection patterns, suspicious DDL activity, and data exfiltration indicators |
| Recommendations | Actionable hardening suggestions based on your specific audit data, such as removing unused logins, tightening permissions, or enabling additional event categories |
Configuration
To use AI Insights, you need an OpenAI API key. Enter it in Settings → General → OpenAI API Key. The key is stored encrypted on the local machine. The AI panel sends a summarized version of your recent audit data — no raw SQL statements or credentials are transmitted.
Settings Window
The Settings window is accessed via the gear icon in the header bar. It has a 6-page left-navigation layout:
General
- Central Database — View and update the connection to the central audit database
- Account — View current user info, change password
- OpenAI API Key — Configure the API key for AI Insights (encrypted with DPAPI)
- Auto-Refresh Interval — Set the dashboard refresh timer (default: 30 seconds)
Service
- Collector Configuration — View and edit the collector service settings (collection interval, deduplication, batch size)
- Service Status — Check if the collector service is running, start/stop from the UI
Users (Admin Only)
The Users page is only visible to Admin-role users. It provides a DataGrid for managing dashboard user accounts.
- Add User — Create a new user with username, display name, password, and role (Admin, Operator, Viewer)
- Delete User — Remove a user account (cannot delete the last Admin)
- Reset Password — Set a new password for any user
- Change Role — Promote or demote users between roles
Role Permissions
| Capability | Admin | Operator | Viewer |
|---|---|---|---|
| View Dashboard & Events | ✓ | ✓ | ✓ |
| Search & Export | ✓ | ✓ | ✓ |
| Generate Reports | ✓ | ✓ | ✓ |
| Acknowledge Alerts | ✓ | ✓ | — |
| Register / Configure Instances | ✓ | ✓ | — |
| Start / Stop Instances | ✓ | ✓ | — |
| Manage Users | ✓ | — | — |
| Manage Integrations | ✓ | — | — |
| Security Settings (Ledger) | ✓ | — | — |
Integrations (SIEM & Webhooks)
The Integrations page lets you configure external endpoints that receive alert notifications. Each endpoint is stored in the central database and managed via a DataGrid.
Adding an Endpoint
- Click Add Integration
- Enter a Name (e.g., “Splunk HEC” or “Slack #security”)
- Enter the URL (webhook URL or SIEM HTTP endpoint)
- Select the Format: JSON or CEF (Common Event Format)
- Enable or disable the endpoint
- Click Save
Supported Platforms
| Platform | Format | Notes |
|---|---|---|
| Splunk (HEC) | JSON | Use the HTTP Event Collector token URL |
| Microsoft Sentinel | JSON / CEF | Use the Log Analytics Data Collector API endpoint |
| Elastic / ELK | JSON | Use the Elasticsearch ingest endpoint or Logstash HTTP input |
| IBM QRadar | CEF | Use the Log Source Management App HTTP receiver |
| Slack | JSON | Use an Incoming Webhook URL |
| Microsoft Teams | JSON | Use an Incoming Webhook connector URL |
| PagerDuty | JSON | Use the Events API v2 endpoint |
| Custom | JSON / CEF | Any HTTP POST endpoint that accepts JSON or CEF payloads |
Test & Health
- Test Webhook — Send a test alert to all enabled endpoints to verify connectivity
- Consecutive Failures — The grid shows a failure counter per endpoint. After 5 consecutive failures, the endpoint is auto-disabled
- Enable / Disable — Toggle individual endpoints without deleting configuration
Compliance Pack — SQL Server Audit integration
The Compliance Pack is an optional upgrade that reads security and backup/restore events from a native SQL Server Audit you configure on the monitored instance, instead of the built-in DDL-trigger + msdb polling path. This is the evidence trail external auditors recognise for SOX, HIPAA, PCI DSS, and ISO 27001 — produced by SQL Server itself and tamper-evident by design.
When to enable it
- You must produce a legally admissible audit trail for regulators
- You need to capture failed BACKUP / RESTORE attempts (
msdb.backupsetonly records successes) - You deploy on Azure SQL Managed Instance and want backup auditing
- You want automatic audit-configuration-change tracking (
AUDIT_CHANGE_GROUP)
If none of the above applies, leave it off — the default DBLense pipeline is lighter and covers all the operational scenarios.
How the collector reads audit data
The collector never reads .sqlaudit / .xel files directly. It calls sys.fn_get_audit_file() over the same TCP 1433 connection it already uses for monitoring — SQL Server opens the file or blob on its own side. No agent, no file share, no Azure SDK, no blob storage keys on the collector host.
Four-step install
- On the monitored host (or Managed Instance), run the supplied script:
- On-prem / VM:
scripts\install-server-audit-onprem.sql(edit audit folder, defaults toC:\SQLAudit\) - Managed Instance:
scripts\install-server-audit-mi.sql(edit blob URL and paste SAS token)
sqlcmd -I -i <script>as sysadmin / CONTROL SERVER. - On-prem / VM:
- Grant the collector login read access:
GRANT VIEW SERVER AUDIT STATE TO [dblense_collector]; -- SQL 2022+ -- or CONTROL SERVER on earlier versions - In the DBLense UI, edit the registered instance and in the Compliance Pack card:
- Tick Use native SQL Server Audit (Compliance Pack)
- Server Audit Name:
DBLenseServerAudit - Audit File Path / URL:
- On-prem:
C:\SQLAudit\*.sqlaudit - MI:
https://<acct>.blob.core.windows.net/sqlaudit/<mi-name>/DBLenseServerAudit/*.xel
- On-prem:
- Save. The collector switches to the Compliance Pack path on its next cycle (≤ 30 s).
Action groups captured
The install script adds the following to the server audit specification:
FAILED_LOGIN_GROUP,SUCCESSFUL_LOGIN_GROUP,LOGOUT_GROUPSERVER_PRINCIPAL_CHANGE_GROUP,DATABASE_PRINCIPAL_CHANGE_GROUPSERVER_ROLE_MEMBER_CHANGE_GROUP,DATABASE_ROLE_MEMBER_CHANGE_GROUPSERVER_PERMISSION_CHANGE_GROUP,DATABASE_PERMISSION_CHANGE_GROUP,SERVER_OBJECT_PERMISSION_CHANGE_GROUP,SCHEMA_OBJECT_PERMISSION_CHANGE_GROUPBACKUP_RESTORE_GROUP(both success and failure)DATABASE_CHANGE_GROUP,DATABASE_OBJECT_CHANGE_GROUP,SCHEMA_OBJECT_CHANGE_GROUPAUDIT_CHANGE_GROUP,SERVER_OPERATION_GROUP
Operational notes
- Disk (on-prem): defaults 50 files × 256 MB = 12 GB ceiling. Security-only audit typically generates 10–100 MB / day.
- Blob (MI): at ~100 MB / day, 90 days retention ≈ 9 GB ≈ a few cents / month on hot-tier LRS.
- Restart safety: audit auto-starts with SQL Server; collector resumes from the last
event_timewatermark — no gaps. - Uninstall: untick Use Server Audit (reverts to default pipeline immediately), then run the UNINSTALL block at the bottom of the install script.
Full setup walkthrough, permissions, cost notes and troubleshooting live in scripts/COMPLIANCE-SETUP.md in the install directory.
Central DB Ledger (defence in depth)
Independently of the Compliance Pack, the DBLense central database can itself be hardened using SQL Server Ledger Tables. This protects the central audit archive against tampering even by a sysadmin on the central server.
What Are Ledger Tables?
SQL Server 2022+ Ledger Tables provide database-level tamper-evidence. Each row is linked to the previous row via a cryptographic hash chain. Any modification to historical data breaks the chain and is detectable.
Ledger Configuration
| Table | Ledger Type | Description |
|---|---|---|
AuditEvents | Append-Only | No UPDATE or DELETE allowed. Once an event is written, it cannot be modified or removed. |
AuditAlerts | Updatable | Supports UPDATE (for acknowledgment tracking) with full change history in a companion history table. |
Enable Ledger
- Navigate to Settings → Security
- Click Enable Ledger Tables
- The tool will alter the AuditEvents and AuditAlerts tables to enable ledger mode (requires SQL Server 2022+)
- Once enabled, the ledger cannot be disabled without recreating the tables
Verify Integrity
Click Verify Integrity to run a ledger verification check. The result shows Pass or Fail for each ledger table, confirming whether any historical data has been tampered with.
Generate Digest
Click Generate Digest to create a cryptographic digest of the current ledger state. Save this digest externally (e.g., Azure Confidential Ledger, Azure Blob Storage, or a file share) for independent verification at a later date.
Diagnostics
- Log Viewer — View recent application and collector service log entries
- Connection Test — Verify connectivity to the central database
- Version Info — Application version, .NET runtime, and database schema version