Return Query Text Along With sp_who2 Using Dynamic Management Views
This article describes how to generate the sp_who2 results including the query text for the spid.
2008-06-26
22,867 reads
This article describes how to generate the sp_who2 results including the query text for the spid.
2008-06-26
22,867 reads
Training in the UK this fall from a variety of SQL Server experts. If you are in the area, I'd recommend one of these classes.
2008-06-26 (first published: 2008-06-19)
2,625 reads
This new series examines methods and procedures to check the status of the Operating system, SQL Server instances and databases, using Windows PowerShell. Part One illustrates how to create a PowerShell script to ping the host machine and how to source the PowerShell function and call the function.
2008-06-26
4,215 reads
SQL Servers seem to proliferate in many companies, making management a headache for DBAs. Steve Jones asks a Friday poll about how you handle all those service account.
2008-06-26
44 reads
SQL Servers seem to proliferate in many companies, making management a headache for DBAs. Steve Jones asks a Friday poll about how you handle all those service account.
2008-06-26
42 reads
SQL Servers seem to proliferate in many companies, making management a headache for DBAs. Steve Jones asks a Friday poll about how you handle all those service account.
2008-06-26
50 reads
Generate formatted reports specifically for executives using PDA devices.
2008-06-25
8,847 reads
Create a computed column in SQL Server using XML data and optimize SQL queries. Learn how to create a function for XQuery and use it within the computed column formula.
2008-06-25
3,199 reads
Learn how to build a B-tree similar to those used by databases to implement indexes.
2008-06-25
3,117 reads
2008-06-25
45 reads
By Vinay Thakur
Continuing from Day 3 where we covered LLM models open/closed and their parameters, Today...
By Steve Jones
One of the nice things about Flyway Desktop is that it helps you manage...
By HeyMo0sh
Microsoft Fabric (not to be confused with the more general term “fabric” in DevOps)...
I'm fairly certain I know the answer to this from digging into it yesterday,...
Hi Team, I am trying to refresh the Azure Synapse Dedicated pool from production...
hi everyone I am not sure how to write the query that will produce...
I have some data in a table:
CREATE TABLE #test_data
(
id INT PRIMARY KEY,
name VARCHAR(100),
birth_date DATE
);
-- Step 2: Insert rows
INSERT INTO #test_data
VALUES
(1, 'Olivia', '2025-01-05'),
(2, 'Emma', '2025-03-02'),
(3, 'Liam', '2025-11-15'),
(4, 'Noah', '2025-12-22');
If I run this query, how many rows are returned?
SELECT *
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t; See possible answers