This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
Hands arranging a bento box with rice and a row of small matching dishes inside, its lid beside it

Shaping Query Results as JSON With FOR JSON PATH

June 13, 2020
Pinal Dave
SQL Tips and Tricks
JSON, SQL Scripts, SQL Server

Shape FOR JSON PATH output with nested objects, child arrays, null options, and wrappers, then return one complete JSON value to clients.

Read More
queryJSON

Azure Data Studio- Export Any SQL SERVER Query As JSON

June 12, 2020
Pinal Dave
SQL Tips and Tricks
Azure Data Studio, JSON, SQL Server Management Studio

Recently, one of my clients’ Comprehensive Database Performance Health Check asked me if I know a way to export any query as JSON with SSMS.

Read More
A long-jump pit with a vermilion flag at last year's best mark and a fresh landing print just past it.

Year-Over-Year Comparisons in One Query

June 11, 2020
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Joins, SQL Reports, SQL Server

Build year-over-year monthly comparisons with a complete calendar, LAG, date-aligned joins, safe percentages, and missing-period rules.

Read More
Gouache painting of a flower shop with an open door and a cart of vermilion tulip crates outside

QDS_LOADDB Wait: Slow Startup and Query Store Load

June 10, 2020
Pinal Dave
SQL Performance
Query Store, SQL Server, SQL Wait Stats

A QDS_LOADDB wait means a database waits for Query Store to load its data at startup. This post reads the wait, checks the size of a store, explains the trace flag that loads Query Store asynchronously, and shows the settings that keep a store small.

Read More
Gouache painting of a squirrel on a mossy stump holding a vermilion acorn, with an empty basket nearby

Give Memory Back to the OS? Why SQL Server Doesn’t

June 9, 2020
Pinal Dave
SQL Tips and Tricks
SQL Cache, SQL DMV, SQL Memory, SQL Scripts

This is a guest post by Brian Gale. It explains why SQL Server doesn’t give memory back to the OS, what the buffer pool keeps in that memory, and why max server memory needs a realistic value. Two queries show what is held right now.

Read More
Gouache painting of a market stall with two rows of sorted apples and a vermilion arrow post pointing at one row

ORDER BY a Parameter in SQL Server: CASE, Types and Plans

June 8, 2020
Pinal Dave
SQL Tips and Tricks
SQL CASE, SQL Order By, SQL Scripts, SQL Stored Procedure

To ORDER BY a parameter in SQL Server, write one CASE expression for each column and direction. This post builds the procedure, shows the type conversion and DISTINCT errors that trip people up, measures the cost of the sort that CASE forces, and compares OPTION (RECOMPILE) and dynamic SQL.

Read More
Several pairs of muddy boots show visitors arriving at the same doorway

How to Find IP Address of All SQL Server Connection? – Interview Question of the Week #280

June 7, 2020
Pinal Dave
SQL Tips and Tricks
Computer Network, SQL DMV, SQL Scripts, SQL Server

Question: How to Find the IP Address of All SQL Server Connection?

I had recently received this question during a recent consultation.

Read More
Previous 1 … 106 107 108 109 110 111 112 … 843 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com