Getting Started — Activity Monitor

Live DMV monitoring works with zero Agent deploy. Deploy History Collection only when you need historic charts, Top Queries history, continuous alerts, or storage growth trends.

Getting Started

  1. Download from dblense.com/download.html (sign in required).
  2. Launch DBLense Activity Monitor. A 14-day full-feature trial starts automatically on first run.
  3. From the Servers home page, click Add (or use sidebar Connections) and enter server name, authentication, and optional monitoring options.
  4. Single-click a server tile to select it; double-click to open the live dashboard.
  5. Confirm the title-bar badge shows the instance type (on-prem / Azure MI / Azure SQL).
  6. Enable Auto-Refresh (5 / 10 / 30 sec) or click Refresh Now.
  7. Optionally right-click a registered instance and choose Deploy History Collection to install collectors, alert tables, evaluation jobs, and retention purge.
  8. Open the Performance tab and choose a query source (Plan cache, Individual, or Query Store) once history collectors have run.
  9. Work through the tabs: Active Requests, Performance, Metrics, Waits, Memory, Storage, Databases, Indexes, Query, Errors, and Alerts.
  10. 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_alerts immediately 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:

SettingDefaultEffect
Repository DBmasterWhere dblense schema / tables / procs are created
Quick Interval15 secPerf metrics, sessions, blocking, XE query harvest cadence
Standard Interval5 minPlan-cache deltas, Query Store intervals, wait stats
Detail Interval15 minHeavier detail collection (plans / deadlocks when enabled)
Perf Retention30 daysAuto-purge window for metrics, queries, waits, blocking
Storage Retention1095 days (~3 yr)DB size history for growth / capacity charts
Storage SnapshotDailyDaily = DB sizes; Weekly = DB sizes + top table sizes
Collect checkboxesMost ONEnable/disable Query Stats, Plans, Query Store, Blocking, Deadlocks, Wait Stats, Storage Sizes
Detailed query tracking (XE)OFFCreates DBLense_ActivityQueryMonitor; feeds Individual (XE) source
Min duration (ms)100XE 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 dblense objects and related jobs when you are done collecting on that instance.
Live monitoring works with zero Agent deploy — you only need Deploy History Collection for historic charts, Top Queries history, continuous alerts, and storage growth trends.

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)

  1. You connect with Windows, SQL, or Entra authentication.
  2. On each auto-refresh (or Refresh Now), the app runs parameterized DMV / catalog queries against the instance.
  3. Results bind to KPI cards, Active Requests, Waits, Memory, Indexes, etc.
  4. 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)

  1. Deploy History Collection creates the dblense schema, tables, stored procedures, and SQL Agent jobs in the repository database.
  2. Quick Collection (~15s) snapshots perf metrics, sessions, blocking, and (if enabled) harvests XE completed-query ring buffers.
  3. Standard Collection (~5 min) computes plan-cache deltas, Query Store intervals, and wait-stat snapshots.
  4. Alert Evaluation (1 min) reads history + a few live checks and writes dblense.alerts.
  5. Purge History (daily) deletes rows older than retention settings.
  6. When you reopen Performance / Metrics / Storage, the app reads those tables to draw trends and Top Queries.

What each collector writes

CollectorTypical tablesUsed by
Quick — perf / sessions / blockingperf_metrics_history, session/blocking historyMetrics charts, alerts (CPU, PLE, connections, blocking)
Standard — plan cachequery_stats_snapshot, query_stats_historyPerformance → Plan cache
Standard — Query Storequery_store_history, watermarksPerformance → Query Store; Query tab
Quick — XE (optional)query_completed_historyPerformance → Individual (XE)
Wait / deadlock / storagewait, deadlock, storage size historyWaits history, deadlock alerts, Storage growth
Alert evaluationalerts, reads alert_rulesAlerts 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.

FieldDescription
Server NameInstance name, FQDN, or Azure endpoint
AuthenticationWindows Auth, SQL Login, or Microsoft Entra ID
DatabaseOptional initial database (defaults to master for instance metrics)
Trust Server CertificateUseful 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.

1. Launch new app
UI fixes apply immediately
2. Open each instance
Double-click server tile or connect
3. Auto-upgrade
Missing tables/procs/jobs created
4. Collectors run
History fills on schedule

What upgrades automatically

Change typeWhen it appliesAction required
UI features (blocking filter, alert grid editing, server tile select/edit, Performance sources)Immediately on launchNone
New history tables (query_stats_snapshot, query_completed_history, query_store_history, alert columns)On connect to each configured instanceOpen each instance once after upgrading
Updated stored procedures & Agent job commandsOn connect (redeploy procs/jobs)Open each instance once
Existing alert rules & history dataPreservedNone — not wiped by upgrade
Optional XE query session (DBLense_ActivityQueryMonitor)On connect if Detailed query tracking is enabled in instance settingsEdit instance → enable checkbox → reconnect
Upgrades use 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_STORE is ON.