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
SQL SERVER - Convert Old Syntax of RAISEERROR to THROW

SQL SERVER – Convert Old Syntax of RAISEERROR to THROW

August 16, 2014
Pinal Dave
SQL Tips and Tricks
SQL Error Messages

A reader upgraded SQL Server and wanted to convert old RAISEERROR to THROW. I show the same error handled both ways, before and after SQL Server 2012.

Read More
SQL SERVER - Validating If Date is Last Day of the Year, Month or Day

SQL SERVER – Validating If Date is Last Day of the Year, Month or Day

August 15, 2014
Pinal Dave
SQL Tips and Tricks
SQL DateTime

A reader asked how to check if a date is the last day of the year, month or week. There is no built-in function, so here is the one I wrote.

Read More
Script to find first day of current month.

SQL SERVER – Script to Find First Day of Current Month

August 14, 2014
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function

Michael Usov suggested a quick way to find the first day of current month while keeping the DATETIME datatype, with or without the time part.

Read More
Clay-covered hands at a potter's wheel shaping a bowl, with a row of earlier practice bowls drying on a shelf.

Making Online Learning Stick

August 13, 2014
Pinal Dave
SQL Tips and Tricks
Professional Development, SQL Server, SQL Training, Starting SQL

Making online learning stick takes practice beside each video, short notes, spaced review, and one finished project that uses the skill.

Read More
Object Created.

SQL SERVER – ​Finding Out What Changed in a Deleted Database – Notes from the Field #041

August 13, 2014
Pinal Dave
SQL Tips and Tricks
Notes from the Field, SQL Server Security

What changed in a database that no longer exists? Brian Kelley shares a real story on finding out what changed in a deleted database.

Read More
A herd of goats on a hillside following one old lead goat wearing the only bell toward a gate

Finding Databases Owned by Personal Logins and Fixing Them

August 12, 2014
Pinal Dave
SQL Tips and Tricks
DBA, SQL Login, SQL Server, SQL Server Security

Find databases owned by personal logins, review an approved replacement owner, and test dbo mapping and execution-context effects.

Read More
Assembled bed frame beside a loose corner bracket and two different bolts

Post-Restore Checklist: Owner, Trustworthy, Broker and Users

August 12, 2014
Pinal Dave
SQL Tips and Tricks
Service Broker, SQL Backup and Restore, SQL Login

The restore finished with no errors, yet the app cannot connect. Here are the four settings a restore quietly changes, and how to fix them.

Read More
A glass pipette above selected potato pieces, one with a blue-black spot, beside untouched carrots and tomatoes

REGEXP_LIKE Performance: Why Pattern Filters Cannot Seek

August 11, 2014
Pinal Dave
SQL Performance
SQL Index, SQL Performance, SQL String

A short pattern can run a long CPU bill. Here is why REGEXP_LIKE scans, and how a plain prefix filter gives the index something to seek.

Read More
A gloved hand at a cave mouth tying a red thread to a boulder and testing it before going in

Every Deployment Script Needs a Tested Undo Script

August 11, 2014
Pinal Dave
SQL Tips and Tricks
Best Practices, DevOps, SQL Scripts, SQL Server

Write and test an undo script before deployment, preserve old module text and changed rows, and identify changes that require recovery.

Read More
A swallow returning to last year's mud nest under the eaves of an old stone barn.

First and Repeat Purchases: Tagging Customer Orders With ROW_NUMBER

August 10, 2014
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Function, SQL Scripts, SQL Server

Tag repeat purchases with deterministic order numbering, calculate days to the second order, and compare customer cohorts fairly.

Read More
Previous 1 … 292 293 294 295 296 297 298 … 593 Next
  • Books
  • Testimonials
  • Privacy Policy

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