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 of a huge stockpot with a little soup beside a smaller pot with a vermilion lid

Shrink tempdb Without Restarting SQL Server

August 15, 2019
Pinal Dave
SQL Tips and Tricks
Shrinking Database, SQL Scripts, SQL Server DBCC, SQL TempDB

To shrink tempdb without a restart, run DBCC SHRINKFILE against each tempdb file with a target size in megabytes. This post checks the file sizes and the space use first, shows the statement with its undo, and tests the shrink rules on a demo database, so the tempdb server stays untouched.

Read More
Gouache painting of a wall of small drawers with one pulled open showing a vermilion key

Show Primary Key of a Table in SQL Server With sp_pkeys

August 14, 2019
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Scripts, SQL Stored Procedure, System Object

To show primary key columns for one table, call sp_pkeys with the table name. This post builds a small demo database, reads a single column and a composite key, and handles schemas and errors. It also lists every key in a database with one catalog query.

Read More
Gouache painting of a single millstone with a line of grain sacks waiting and the first sack in vermilion

Signal Waits: Detect CPU Pressure With Wait Statistics

August 12, 2019
Pinal Dave
SQL Performance
SQL CPU, SQL DMV, SQL Scripts, SQL Wait Stats

Signal waits are the part of every wait that a task spends in the queue for a free CPU. This post ranks the wait types by signal time, shows why timer waits ruin the total share, and samples the signal share into a small table so a whole working day can be read interval by interval.

Read More
The first group of towels is set aside while the remaining sequence stays on its shelf

How to Skip Top N Rows in SQL Server? – Interview Question of the Week #237

August 11, 2019
Pinal Dave
SQL Interview Questions and Answers
Ranking Functions, SQL Function, SQL Paging, SQL Scripts, SQL Server

Question: How to skip top N Rows in SQL Server and retrieve the rest of the rows? Answer: I had asked the above question in one of the interviews last week.

Read More
Title card: Not Clustered or the Cluster Service Is Up and Online

SQL SERVER – Patch Install Rule Error – Not Clustered or the Cluster Service is Up and Online

August 10, 2019
Pinal Dave
SQL Tips and Tricks
DotNet, SQL Error Messages, SQL Patch, SQL Scripts, SQL Server, SQL Server Cluster, SQL Server Services

The error which we observed was a failure of a rule – Patch Install Rule Error – Not clustered or the cluster service is up and online.

Read More
Gouache painting of three garden beds in a row with a hoe whose grip is vermilion

Delete the Wrong Row: A Cheap Answer That Passes the Test

August 8, 2019
Pinal Dave
SQL Puzzle
SQL Delete, SQL Performance, SQL Scripts

A cheap answer to the multiple table delete puzzle reads only 6 pages and passes the check. It can still delete the wrong row. This post shows the answer, asks you to find the row it removes by mistake, and fixes it with a delete that costs 5 reads.

Read More
Gouache painting of a crowd of small rowboats at a narrow quay with one vermilion boat at the end

Max Worker Count: Why Typing 10000 Slowed a Server

August 7, 2019
Pinal Dave
SQL Tips and Tricks
SQL CPU, SQL DMV, SQL Scripts, SQL Server Configuration

Max worker count looks like a speed dial but behaves like a safety limit. A client typed 10000 on an 8 processor server and slowed it, and a reset to 0 fixed it in minutes. Two read-only queries show your value and whether workers run short.

Read More
Previous 1 … 66 67 68 69 70 71 72 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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