Getting Started — Activity Monitor
Getting Started
- Download from dblense.com/download.html (sign in required).
- Launch DBLense Activity Monitor. A 14-day full-feature trial starts automatically on first run.
- From the Servers home page, click Add (or use sidebar Connections) and enter server name, authentication, and optional monitoring options.
- Single-click a server tile to select it; double-click to open the live dashboard.
- Confirm the title-bar badge shows the instance type (on-prem / Azure MI / Azure SQL).
- Enable Auto-Refresh (5 / 10 / 30 sec) or click Refresh Now.
- Optionally right-click a registered instance and choose Deploy History Collection to install collectors, alert tables, evaluation jobs, and retention purge.
- Open the Performance tab and choose a query source (Plan cache, Individual, or Query Store) once history collectors have run.
- Work through the tabs: Active Requests, Performance, Metrics, Waits, Memory, Storage, Databases, Indexes, Query, Errors, and Alerts.
- Configure per-instance alert rules from sidebar ALERTS.
Controlling the Tool
You control Activity Monitor at three layers: the desktop UI, per-instance registration settings, and SQL Agent jobs on the server.
1. Desktop (immediate)
- Auto-Refresh interval — how often the app re-queries live DMVs while a dashboard is open. Longer intervals reduce load on busy servers.
- Refresh Now — force a sample during an incident.
- Show blocking only — filter Active Requests without changing collection.
- Performance Source — Plan cache / Individual (XE) / Query Store (requires matching collectors).
- Chart time brush / range — select a window on historic charts; Top Queries follows that window. Right-click charts for Reset selection / Jump to Session History where available.
- Top Queries Grid vs Chart — switch visualization of the same ranked set.
- Theme — light or dark; does not affect server collection.
- Evaluate Now (Alerts) — run
usp_evaluate_alertsimmediately without waiting for the Agent minute job.
2. Instance registration / Edit (persisted locally + applied on connect)
Select a server tile → Edit, or right-click a connection → Edit Connection. Key knobs:
| Setting | Default | Effect |
|---|---|---|
| Repository DB | master | Where dblense schema / tables / procs are created |
| Quick Interval | 15 sec | Perf metrics, sessions, blocking, XE query harvest cadence |
| Standard Interval | 5 min | Plan-cache deltas, Query Store intervals, wait stats |
| Detail Interval | 15 min | Heavier detail collection (plans / deadlocks when enabled) |
| Perf Retention | 30 days | Auto-purge window for metrics, queries, waits, blocking |
| Storage Retention | 1095 days (~3 yr) | DB size history for growth / capacity charts |
| Storage Snapshot | Daily | Daily = DB sizes; Weekly = DB sizes + top table sizes |
| Collect checkboxes | Most ON | Enable/disable Query Stats, Plans, Query Store, Blocking, Deadlocks, Wait Stats, Storage Sizes |
| Detailed query tracking (XE) | OFF | Creates DBLense_ActivityQueryMonitor; feeds Individual (XE) source |
| Min duration (ms) | 100 | XE only captures statements at or above this duration |
Saving Edit updates local config. Server-side jobs, procs, and optional XE session are created or refreshed on next connect / Deploy.
3. SQL Agent (unattended)
- Enable or disable jobs in SSMS / Azure Data Studio if you need to pause collection without removing monitoring.
- Job schedules follow the intervals you set at deploy/edit time.
- Remove History Collection drops
dblenseobjects and related jobs when you are done collecting on that instance.
How Data Is Collected
Two independent paths feed the UI. Understanding them avoids confusion when a chart is empty.
Live path (always on while dashboard is open)
- You connect with Windows, SQL, or Entra authentication.
- On each auto-refresh (or Refresh Now), the app runs parameterized DMV / catalog queries against the instance.
- Results bind to KPI cards, Active Requests, Waits, Memory, Indexes, etc.
- When you close the app or leave the instance, live sampling stops. Nothing is written to SQL Server for this path alone.
Typical live sources include sys.dm_exec_requests, sys.dm_exec_sessions, sys.dm_os_wait_stats, sys.dm_os_performance_counters, sys.dm_exec_query_stats, memory clerks, database files, and index DMVs.
History path (optional, runs without the app)
- Deploy History Collection creates the
dblenseschema, tables, stored procedures, and SQL Agent jobs in the repository database. - Quick Collection (~15s) snapshots perf metrics, sessions, blocking, and (if enabled) harvests XE completed-query ring buffers.
- Standard Collection (~5 min) computes plan-cache deltas, Query Store intervals, and wait-stat snapshots.
- Alert Evaluation (1 min) reads history + a few live checks and writes
dblense.alerts. - Purge History (daily) deletes rows older than retention settings.
- When you reopen Performance / Metrics / Storage, the app reads those tables to draw trends and Top Queries.
What each collector writes
| Collector | Typical tables | Used by |
|---|---|---|
| Quick — perf / sessions / blocking | perf_metrics_history, session/blocking history | Metrics charts, alerts (CPU, PLE, connections, blocking) |
| Standard — plan cache | query_stats_snapshot, query_stats_history | Performance → Plan cache |
| Standard — Query Store | query_store_history, watermarks | Performance → Query Store; Query tab |
| Quick — XE (optional) | query_completed_history | Performance → Individual (XE) |
| Wait / deadlock / storage | wait, deadlock, storage size history | Waits history, deadlock alerts, Storage growth |
| Alert evaluation | alerts, reads alert_rules | Alerts inbox, email, Servers rail |
Trial & Licensing
Licensing matches other DBLense desktop tools (XRAY, Script Runner, QueryStore Analyzer, and so on): online activation against dblense.com, machine fingerprint, heartbeats, and a 30-day offline grace after a successful server validation.
- 14-day trial includes all features — no credit card required.
- After the trial expires, activate a paid Activity Monitor key to continue.
- Each key activates on one machine (fingerprint-bound).
- Activation requires internet access to
dblense.com. Keys are not activated offline. - Previously validated licenses remain usable for up to 30 days offline; heartbeats run about every 7 days when online.
- Manage license from the title-bar license badge, or About → Manage License. Buy/renew at Pricing and My Account.
- License cache:
%LOCALAPPDATA%\DBLenseActivityMonitor\license.json. - Note: The current Suite package covers QueryStore Analyzer, Script Runner, Log Reader, and SQL Server XRAY. Activity Monitor is licensed separately.
Connections & Authentication
Saved connections live in the sidebar under Connections. Use Manage Connections to add, edit, remove, export, or import registered servers.
| Field | Description |
|---|---|
| Server Name | Instance name, FQDN, or Azure endpoint |
| Authentication | Windows Auth, SQL Login, or Microsoft Entra ID |
| Database | Optional initial database (defaults to master for instance metrics) |
| Trust Server Certificate | Useful for lab / self-signed TLS |
SQL passwords are encrypted with Windows DPAPI and stay on the same Windows user/machine. Export deliberately omits secrets so you can share connection lists safely; re-enter passwords after import.
On connect, Activity Monitor detects platform (on-premises, Azure SQL Managed Instance, Azure SQL Database) and adjusts Agent / storage / job-failure behavior accordingly. It can also auto-discover an existing dblense monitoring database by scanning common names and online user databases for dblense.monitoring_config.
Upgrading the Tool
When you install a newer build of Activity Monitor, you do not need to unregister and re-register your instances. Saved connections and monitoring configuration remain in the app. Database schema changes are applied automatically when you open each instance.
What upgrades automatically
| Change type | When it applies | Action required |
|---|---|---|
| UI features (blocking filter, alert grid editing, server tile select/edit, Performance sources) | Immediately on launch | None |
New history tables (query_stats_snapshot, query_completed_history, query_store_history, alert columns) | On connect to each configured instance | Open each instance once after upgrading |
| Updated stored procedures & Agent job commands | On connect (redeploy procs/jobs) | Open each instance once |
| Existing alert rules & history data | Preserved | None — not wiped by upgrade |
Optional XE query session (DBLense_ActivityQueryMonitor) | On connect if Detailed query tracking is enabled in instance settings | Edit instance → enable checkbox → reconnect |
IF NOT EXISTS logic — safe on already-deployed instances. Use Deploy History Collection manually only if auto-upgrade fails or you need a full fresh install.
After upgrading — when to expect data
- Plan cache (Phase 1) — first Standard Collection seeds a snapshot; interval deltas appear from the second cycle onward (~10 minutes by default).
- Individual / XE (Phase 2) — requires Detailed query tracking enabled and reconnect; captures completed statements above the min-duration threshold.
- Query Store (Phase 3) — enabled by default in instance settings; collects from databases where
QUERY_STOREis ON.