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
Gouache painting: a round wooden storehouse lined with a ring of grain bins, every bin empty and swept ready to refill except one whose small door is held shut by a vermilion latch

log_reuse_wait_desc: Why the Transaction Log Will Not Shrink

December 7, 2012
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Server DBCC, SQL Transactions, Transaction Log

log_reuse_wait_desc tells you why SQL Server cannot reuse its transaction log, so you know why a shrink gives nothing back. This post causes LOG_BACKUP and ACTIVE_TRANSACTION on purpose in a test database on SQL Server 2025, measures the log and fixes each one.

Read More
Four dishes waiting in line for one oven, a red casserole first

Ordering a Maintenance Window: Backups, CHECKDB and Index Work

November 6, 2012
Pinal Dave
SQL Tips and Tricks
DBA, Maintenance Plan, SQL Backup and Restore, SQL Index, SQL Server DBCC

Order a maintenance window by listing Agent schedules, separating CHECKDB, backups, index work, and statistics, then tracking growth.

Read More
Pebbles sorted into heaps by size along a driftwood plank on a beach, one heap much taller than the others.

Statistics Histograms Explained

March 22, 2011
Pinal Dave
SQL Performance
Execution Plan, SQL Performance, SQL Server DBCC, SQL Statistics

Statistics histograms explained through steps, RANGE_ROWS, EQ_ROWS, and DBCC SHOW_STATISTICS help connect data shape to plan estimates.

Read More
SQL SERVER - Shrinking Database is Bad - Increases Fragmentation - Reduces Performance

SQL SERVER – Shrinking Database is Bad – Increases Fragmentation – Reduces Performance

January 19, 2011
Pinal Dave
SQL Performance
SQL Index, SQL Scripts, SQL Server, SQL Server DBCC

Shrinking database is bad: it increases fragmentation and reduces performance. Here is a simple example with two tables that shows it step by step.

Read More
Shrinking Database

SQL SERVER – Shrinking Database NDF and MDF Files

June 15, 2010
Pinal Dave
SQL Tips and Tricks
Shrinking Database, SQL Server, SQL Server DBCC

Previously, I had written a blog post about SQL SERVER. I am posting this blog post here about Shrinking Database.

Read More
SQL Server Management Studio Query Results Window.

SQL SERVER – Get Last Running Query Based on SPID

July 19, 2009
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server DBCC, SQL System Table

How to see the last running query of another session based on its SPID, using @@SPID to find session IDs and DBCC INPUTBUFFER to read the query.

Read More
A row of old brass light switches, one held in the up position by a strip of yellowed, curling tape.

Trace Flags Worth Knowing About

March 14, 2009
Pinal Dave
SQL Tips and Tricks
DBA, SQL Server Configuration, SQL Server DBCC, TraceFlags

Review trace flags worth knowing about in current SQL Server, distinguish session, global, and startup scope, and verify each flag’s support.

Read More
Previous 1 … 7 8 9 10 11 12 13 … 16 Next
  • Books
  • Testimonials
  • Privacy Policy

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