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
Seven source tiles remain intact beside four distinct reliefs on a separate display board.

SQL SERVER – Remove Duplicate Rows Using UNION Operator

September 19, 2018
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Union clause

The UNION operator removes duplicates from a query result without deleting source rows. I use a small example to show that distinction.

Read More
Diagram of the sample sys.databases result with AVAILABILITY_REPLICA in log_reuse_wait_desc, the transaction log records the secondary has applied and the ones it is still applying, and three causes: slow or unreachable network, long running transaction, resource constraint

Log Reuse Wait Reason AVAILABILITY_REPLICA: What It Means and How to Fix It

September 18, 2018
Pinal Dave
SQL Tips and Tricks
AlwaysOn, SQL Replication, SQL Scripts, SQL Server, Transaction Log

A customer’s database always showed AVAILABILITY_REPLICA as the log reuse wait reason in sys.databases. Here is what it means and three causes to check: a slow network, a long running transaction and a resource constraint.

Read More
Gouache painting of a clear pond filling with silt from a muddy stream with a vermilion footbridge over it

Find the Query Growing TempDB in SQL Server

September 17, 2018
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Scripts, SQL TempDB

To find the query growing TempDB, read the space each session has allocated and join it to its statement. This post separates temporary tables from spills, watches both live in a second window and shows the totals after a query ends. It ends with ways to fix a spill.

Read More
Gouache painting of three seedlings at different heights with a vermilion ribbon on the middle one

Estimated Completion Time for Backup, Restore and DBCC

September 15, 2018
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL DMV, SQL Scripts, SQL Server DBCC

The estimated completion time of a backup, restore or DBCC command is one query away. This post builds a monitor query on sys.dm_exec_requests and watches a backup, a restore and a DBCC check in a second window. It also covers STATS and the DBCC step name.

Read More
SQL Server size selection.

SQL SERVER – Microsoft Azure – Unable to Find Higher Tier Series Virtual Machine to Upgrade

September 13, 2018
Pinal Dave
SQL Tips and Tricks
AlwaysOn, SQL Azure, SQL Error Messages, SQL High Availability, SQL Server, Virtualization

My client wanted to upsize an Azure VM running Always On from D-Series to a higher tier G-Series size, but it was missing from the list. Here is what I suggested.

Read More
Gouache painting of three whole pies and one separated slice in vermilion on a small plate

Extract Decimal Part of a Number in SQL Server

September 12, 2018
Pinal Dave
SQL Tips and Tricks
Mathematical Function, SQL Datatype, SQL Scripts

To extract decimal part of a number in SQL Server, use ABS(value) % 1. This post compares four methods on positive and negative amounts and explains why the result is sometimes 0. It also covers float columns, digits as whole numbers and trailing zeros.

Read More
Replica Server Name Table.

SQL SERVER – Scripts to Overview HADR / AlwaysOn Local Replica Server

September 11, 2018
Pinal Dave
SQL Tips and Tricks
AlwaysOn, SQL Replication, SQL Scripts, SQL Server

SQL Server expert Dominic Wirth shares a script that gives a utilization overview of the local AlwaysOn replica server: database count and size, by role and group.

Read More
Previous 1 … 102 103 104 105 106 107 108 … 572 Next
  • Books
  • Testimonials
  • Privacy Policy

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