SQL Server – default trace FAQ
Has someone deleted a table?
Are you trying to track auto grow events? Problem scenarios such as Database autogrow and slow...
2012-04-11
1,042 reads
Has someone deleted a table?
Are you trying to track auto grow events? Problem scenarios such as Database autogrow and slow...
2012-04-11
1,042 reads
Q. How can I obtain the members of a role within a database?
A. One method is to use sp_helprolemember
EXEC mydatabase.dbo.sp_helprolemember
--returns...
2012-04-10
963 reads
As a follow up to an earlier posts - SQL Server - BACKUP LOG WITH NO_LOG
As of SQL Server 2008 , BACKUP...
2012-04-05
5,132 reads
This error message can appear in the SQL Server Error Log files .
Autogrow of file 'MY_DB' in database 'MY_DB' took...
2012-04-04
3,512 reads
First thing this morning – a request from a DBA to confirm if Differential BACKUPS can be restored on a database...
2012-03-23
15,866 reads
Event ID 7026 and i8042prt is a recurring error in the Windows Event Logs. I usually see this error on...
2012-03-22
7,225 reads
The System logs returned :
The device, xxxxxxxxxxxxxx, did not respond within the timeout period.
Some common causes
1) SCSI controller firmware
2) Incorrect...
2012-03-19
1,384 reads
Transactions generate IO, latching and locking on tables and indexes , while attempting to access data. The sys.dm_db_index_operational_stats DMV returns aggregated data...
2012-03-15
1,349 reads
Specialise or a generalise? It all depends on how you define these terms.
A SQL Server DBA may be considered to...
2012-03-13
745 reads
When log records remain active for a long time – truncation can be delayed. The delays can cause the transaction logs...
2012-03-12
1,274 reads
By HeyMo0sh
Working in DevOps long enough teaches you two universal truths: That’s exactly why I...
By Steve Jones
Finding duplicates was an interview question for me years ago, and I’ve never forgotten...
By HeyMo0sh
Over time, I’ve realised that one of the hardest parts of cloud management isn’t...
Comments posted to this topic are about the item Fun with JSON II
Comments posted to this topic are about the item Changing Data Types
Comments posted to this topic are about the item Answering Questions On Dropped Columns
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 t1.[key] AS row,
t2.*
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t1
CROSS APPLY OPENJSON(t1.value) t2; See possible answers