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 three differently shaped tea cups on a bamboo tray beside a slate blue teapot, the small one vermilion

PRINT Date Format in SQL Server: PRINT Versus SELECT

August 23, 2019
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL String

The PRINT date format differs from the SELECT format, because PRINT converts the value to text first. This post tests PRINT with six date and time types, shows why joining text and a datetime fails with Msg 241, shows how the session language changes the month name, and gives the formats that stay the same everywhere.

Read More
A child's handprint set hard in a concrete square by a back door, a garden trowel lying useless beside it.

Immutable Backups: Keeping a Copy Ransomware Cannot Delete

August 20, 2019
Pinal Dave
SQL Tips and Tricks
DBA, SQL Backup and Restore, SQL Server, SQL Server Security

Design immutable backups with enforced retention, separate storage access, offline recovery material, checksum checks, and restore tests.

Read More
Gouache painting of a small tower of round, square and triangular wooden blocks topped with a vermilion block

DATETIMEFROMPARTS Function: Build Dates From Parts

August 17, 2019
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

The DATETIMEFROMPARTS function builds a datetime value from seven numbers, with no string conversion and no language trap. This post tests how it rounds milliseconds, which parts raise an error, how it treats NULL, and how its relatives build dates, times and offsets.

Read More
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
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 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 … 71 72 73 74 75 76 77 … 570 Next
  • Books
  • Testimonials
  • Privacy Policy

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