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
Two bowls hold equal groups of qualifying red beads while green beads remain outside

What is Faster, SUM or COUNT? – Interview Question of the Week #231

June 30, 2019
Pinal Dave
SQL Interview Questions and Answers
SQL Function, SQL Performance, SQL Scripts, SQL Server

Question: What is Faster, SUM or COUNT? Answer: Both are the same. I was asked this question during my Comprehensive Database Performance Health Check.

Read More
Title card: Automatic Seeding Failed With a Transient Error

SQL SERVER – Automatic Seeding of Availability Database ‘SQLAGDB’ in Availability Group ‘AG’ Failed With a Transient Error. The Operation Will be Retried

June 29, 2019
Pinal Dave
SQL Tips and Tricks
AlwaysOn, SQL High Availability, SQL Scripts, SQL Server

Earlier I have written few blogs about automatic seeding feature. In this blog we would learn how to fix error: Automatic seeding of availability database.

Read More
Gouache painting of two matching picnic baskets, one full and one nearly empty in vermilion

COPY_ONLY Full Backup Size: What Differs Between Always On Replicas

June 27, 2019
Pinal Dave
SQL Tips and Tricks
AlwaysOn, SQL Backup and Restore, SQL High Availability, SQL Scripts

A COPY_ONLY full backup of the same database can have a different size on the primary and the secondary replica of an Always On group. This post reads the log pages in the backup messages, shows them on a standalone database and explains how to compare backups fairly. It also covers what a restore needs.

Read More
Gouache painting of a swept doormat with a pile of old brass keys aside and one vermilion key in the middle

DBCC FLUSHAUTHCACHE: Force Azure SQL to Re-authenticate

June 25, 2019
Pinal Dave
SQL Tips and Tricks
SQL Azure, SQL Login, SQL Scripts, SQL Server Security

DBCC FLUSHAUTHCACHE clears the authentication cache of an Azure SQL database, so open connections must authenticate again. This post shows what a password change does to open sessions on SQL Server, why Azure SQL needs the extra command and how to list the sessions you want to end. It also covers the cautions that matter.

Read More
Gouache painting of six clay pots on a potting bench, five tipped over and empty, one upright vermilion pot

Drop Tables by Prefix in SQL Server and Azure SQL Database

June 21, 2019
Pinal Dave
SQL Tips and Tricks
SQL Azure, SQL Cursor, SQL Scripts, SQL Table Operation

To drop tables by prefix, list the matching tables first and drop them with a script that quotes every schema and table name. This post shows why the underscore in a prefix is a trap, a one-statement version and a cursor version. It works in SQL Server and in Azure SQL Database.

Read More
Gouache painting of a row of wooden trays of sawdust on a workbench with the overflowing one in vermilion

TempDB Performance: Five Settings to Check in SQL Server

June 19, 2019
Pinal Dave
SQL Performance
Best Practices, SQL Data Storage, SQL Scripts, SQL Server, SQL TempDB

TempDB performance depends on five settings that you can read in a few minutes: how big it is, how many data files it has, whether they match, how it grows and where it lives. Three read-only queries check each one. The post also explains what to do with the answers.

Read More
Gouache painting of a vermilion cart rolling crates up a wide ramp onto a boat while a narrow plank stands unused

CHECKPOINT Duration: Can You Speed Up a Manual CHECKPOINT?

June 18, 2019
Pinal Dave
SQL Performance
Best Practices, SQL Memory, SQL Scripts, SQL Server

The CHECKPOINT duration argument sets a target time in seconds. This post times a manual checkpoint on a database with 130 MB of dirty pages, and shows that a long duration slows it badly while a short one does not make it faster. It also shows that a backup flushes dirty pages by itself.

Read More
Previous 1 … 70 71 72 73 74 75 76 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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