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
Retained completed fabric rolls are separate from unfinished work on a background loom.

SQL SERVER – T-SQL Script to Check SQL Server Job History

December 22, 2018
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Scripts, SQL Server, SQL Server Agent

SQL Server Agent Job History can be queried from msdb. A New Zealand customer requested this report during our weekly health check.

Read More
A red wheelbarrow stopped across a garden path with three more wheelbarrows waiting behind it

Diagnosing Blocking Chains With sys.dm_exec_requests

December 12, 2018
Pinal Dave
SQL Performance
DBA, SQL DMV, SQL Lock, SQL Performance, SQL Wait Stats

Trace blocking chains from active requests to a candidate head session, inspect sleeping transactions, and verify the owner before action.

Read More
An intact swimring is partly deflated beside its disconnected pump

How to Shrink All the Log Files for SQL Server? – Interview Question of the Week #203

December 9, 2018
Pinal Dave
SQL Interview Questions and Answers
Shrinking Database, SQL Backup and Restore, SQL DMV, SQL Scripts, SQL Server

Question: How to Shrink All the Log Files for SQL Server? Here is the script, plus why you should shrink only log files and never data files.

Read More
Gouache painting of a stack of dusty suitcases with a vermilion strap on the oldest one at the bottom

Find the Oldest Query Plan in the Plan Cache

November 30, 2018
Pinal Dave
SQL Tips and Tricks
SQL Cache, SQL DMV, SQL Scripts

To find the oldest query plan in the plan cache, sort sys.dm_exec_query_stats by creation_time. This post tests the idea on a demo with three procedures, compares the oldest plan with the server start time, and lists what clears the plan cache.

Read More
Many small loose bundles of wheat on a barn floor around one tall sheaf tied in red.

Columnstore Rowgroup Health: Finding Small and Open Rowgroups

November 22, 2018
Pinal Dave
SQL Performance
ColumnStore Index, SQL DMV, SQL Index, SQL Server

Inspect columnstore rowgroup health, understand small and deleted groups, and choose reorganize or rebuild from measured evidence.

Read More
Logical and Physical Names of Files in SQL Server Database.

SQL SERVER – Get List of the Logical and Physical Name of the Files in the Entire Database

November 19, 2018
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Scripts, SQL Server, System Database

During a Health Check we needed the logical and physical name of every file in every database on the instance. Here is the script I built, with the file type too.

Read More
Stacks of blank index cards are weighed on a brass balance

How to Find Size of the Index for Tables? – Interview Question of the Week #198

November 4, 2018
Pinal Dave
SQL Interview Questions and Answers
SQL DMV, SQL Index, SQL Scripts, SQL Server

How do you find the size of the index for tables? A client asked me during a Health Check, and this script lists schema, table, index and size in KB and MB.

Read More
Previous 1 … 14 15 16 17 18 19 20 … 44 Next
  • Books
  • Testimonials
  • Privacy Policy

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