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 an old oak with a vermilion ribbon beside a stump showing growth rings, with young saplings nearby

Msg 17177 in the SQL Server Error Log: What It Means

March 9, 2020
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Log, SQL Scripts, SQL Server Services

Msg 17177 is an informational line in the SQL Server error log that reports the process ID of the instance. This post explains its two forms, a daily line and a start-up line, and reads both with a short query. It also shows how the line reveals uptime, downtime and the time zone of the server.

Read More
Several intact gears sit in a fitted case beside separate maintenance and inspection tools.

SQL SERVER Management Studio – Rebuild All Indexes on Table

March 6, 2020
Pinal Dave
SQL Tips and Tricks
SQL Index, SQL Scripts, SQL Server, SQL Server Management Studio

SSMS can open a Rebuild All dialog for table indexes. An e-commerce customer discovered this shortcut during my health check.

Read More
Gouache painting of a seedling tray with most cells sprouted and three empty, with a vermilion watering can beside it

Count NULLs in a Column in SQL Server: Five Ways Compared

March 5, 2020
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Group By, SQL NULL, SQL Scripts

To count NULLs in a column, filter with IS NULL and count the rows, or subtract COUNT(column) from COUNT(*). This post tests five ways on 100,000 rows and compares their page reads. It also counts NULLs in several columns at once and shows the NULL group in GROUP BY.

Read More
Gouache painting of a wooden ship's wheel held still by a loop of vermilion rope

Setup Administrator Rule Failed Even for an Administrator Account

March 4, 2020
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server, SQL Server 2019, SQL Server Installation, SQL Server Security

The Setup administrator rule failed for a client even though they were logged on as an administrator. The setup log showed that sqlsccn.dll could not be loaded. The setup media had files missing, and downloading the media again fixed it.

Read More
Gouache painting of a long tulip with a vermilion bloom in a short cream vase, with a second bloom lying beside it

ANSI_WARNINGS OFF: Why SQL Server Truncates Data Silently

March 3, 2020
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Error Messages, SQL Scripts, SQL Server 2019

With ANSI_WARNINGS OFF, SQL Server cuts a string to fit its column and reports no error. This post runs the same insert with the setting on and off, and shows what else changes: variables, divide by zero and filtered indexes. It also shows how to check which setting a session uses.

Read More
Gouache painting of a heap of pears beside a grey wooden crate, a blue crate and an open vermilion crate

SELECT INTO Table Variable: Why It Fails and What to Use

March 2, 2020
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Table Operation, SQL Variable, Temp Table

SELECT INTO table variable fails with Msg 102 because SELECT INTO creates its target table and a table variable must be declared first. This post shows two working fixes, a declared table variable and a temp table. It also compares them on rollback, dynamic SQL and row estimates.

Read More
A pottery roller leaves patterned impressions in clay tiles, with one tile showing a different gap.

Detecting Changed Rows With a Row Hash

February 29, 2020
Pinal Dave
SQL Tips and Tricks
Batch, ETL, SQL Function, Temp Table

Compare one fingerprint instead of twenty columns. I show a safe HASHBYTES recipe, the NULL trap that fools CONCAT_WS, and a load that touches only the rows that changed.

Read More
Previous 1 … 57 58 59 60 61 62 63 … 572 Next
  • Books
  • Testimonials
  • Privacy Policy

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