How to view active sessions in SQL Server instance databases
Run the following T-SQL script for listing all active sessions in all SQL Server databases of the open SQL instance.
SELECT DB_NAME(dbid) AS DBName, COUNT(dbid) AS NumberOfConnections, loginame FROM sys.sysprocesses GROUP BY dbid, loginame ORDER BY DB_NAME(dbid)This will return a list of the active sessions, grouped by the number of active connections and login name and ordered by the name of the database.
Alternatively you can run the sp_who stored procedure by executing the following command as a script inside SQL Server Management Studio:
exec sp_whoAlso you can open the Activity Monitor tool by right clicking on the SQL instance inside the SQL Server Management Studio and choose to launch the Activity Monitor. This shows a list of parameters of the active SQL instance and databases, such as running processes and system resources consumed.
4. TRACE-AI Execution Workflow
Section titled “4. TRACE-AI Execution Workflow”- Triage: Review monitoring dashboards or error metrics for initial anomaly spikes or timeout signatures.
- Record Evidence: Export service diagnostic logs, event viewers, or failure traces.
- Analyze: Correlate error signatures against known infrastructure or configuration limits.
- Correlate: Match active incident timeline against recent deployments or scale events.
- Execute & Verify: Apply corrective remediation steps and verify telemetry baseline recovery.
5. Vendor Documentation & Validation Guardrails
Section titled “5. Vendor Documentation & Validation Guardrails”- Authority Reference: Cross-reference configuration changes against official vendor documentation.
- Validation Gate: Require staging environment testing and Human-in-the-Loop SME approval before production changes.