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
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 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
Gouache painting of a vermilion cooking pot standing empty beside a pile of vegetable peels on a cutting board

Restore From LDF File Only: Why It Fails and What Works

June 6, 2020
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Server Management Studio, SQL Server Security

A restore from LDF file only is not possible, because a log holds changes and not the database. This post answers five common questions, shows the error SQL Server gives, and restores a database from a full backup, a log backup and a tail-log backup.

Read More
Gouache painting of a single wooden drawer with two keyholes, one holding a brass key and a vermilion key resting beside the other

Second Identity Column Workaround: Computed Column or Sequence

June 5, 2020
Pinal Dave
SQL Tips and Tricks
Computed Column, SQL Identity, SQL Scripts

A SQL Server table can have only one identity column, and a second one fails with Msg 2744. This second identity column workaround compares a computed column with a sequence, shows what each does with gaps, rollbacks and large values, and explains when to pick which.

Read More
Previous 1 … 49 50 51 52 53 54 55 … 570 Next
  • Books
  • Testimonials
  • Privacy Policy

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