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: a short wooden rack holds eight cream balls in one row

Bit Shifts: Move Bits Without Rotating Them

May 16, 2008
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

Bit shifts fill vacant positions with zero and discard bits past the type width. Compare tinyint with int and a negative shift direction.

Read More
A shocked wooden mannequin in front of a wide-open safe that is empty except for one moth

Untested Backup: The Joke That Ends With a Resignation Letter

May 15, 2008
Pinal Dave
SQL Tips and Tricks
DBA, SQL Backup and Restore, SQL Humor, SQL Server DBCC

An untested backup is the darkest joke in the DBA world. Here’s how the story usually ends, and the simple restore drill that keeps you out of it.

Read More
SQL SERVER - Orphaned MS DTC Transaction Information

SQL SERVER – Orphaned MS DTC Transaction Information

May 14, 2008
Pinal Dave
SQL Performance
SQL Error Messages, SQL Scripts

An orphaned MS DTC transaction kept crashing our IIS application pool. A quick script on sys.syslockinfo shows if you have one, and a Microsoft hotfix solved it.

Read More
SQL SERVER - Four Basic SQL Statements - SQL Operations

SQL SERVER – Four Basic SQL Statements – SQL Operations

May 13, 2008
Pinal Dave
SQL Tips and Tricks
Database, Software Development, SQL Coding Standards

The four basic SQL statements are SELECT, UPDATE, INSERT and DELETE. A short note on what each one does, with a link to my one page FAQ sheet for full syntax.

Read More
SQL SERVER - SQL SERVER - Comparison : Similarity and Difference #TempTable vs @TempVariable - Part 2

SQL SERVER – SQL SERVER – Comparison : Similarity and Difference #TempTable vs @TempVariable – Part 2

May 12, 2008
Pinal Dave
SQL Tips and Tricks
Temp Table

Can a temp table have indexes? Yes. In Part 2 of #TempTable vs @TempVariable, I explain how temporary table indexes live in TempDB and when they help.

Read More
Six blank wooden blocks fit a bounded composing tray while a spare rests outside

Readable IDs: A Bounded Computed Invoice Number

May 11, 2008
Pinal Dave
SQL Tips and Tricks
Best Practices, Computed Column, SQL Server

Create readable IDs with a computed invoice number while retaining the numeric key. Enforce the six-digit domain and plan format changes before growth.

Read More
SQL SERVER - Function Property - Deterministic or Non-Deterministic

SQL SERVER – Function Property – Deterministic or Non-Deterministic

May 10, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

How do you tell if a user defined function is deterministic or non-deterministic? One OBJECTPROPERTY call with IsDeterministic gives you the answer.

Read More
Colored ceramic beads in a pale shallow tray beside an empty tray and a separate blue bead.

XQuery distinct-values: Deduplicate Atomic Values, Not Nodes

May 9, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL XML

XQuery distinct-values removes repeated atomic values rather than selecting representative source nodes. I rebuild a small sorted XML result from repeated text. The example also keeps an empty document in view.

Read More
SQL SERVER - 2005 - Find Tables With Foreign Key Constraint in Database - Part 2

SQL SERVER – 2005 – Find Tables With Foreign Key Constraint in Database – Part 2

May 8, 2008
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Scripts, SQL System Table

Joffery improved my script to find tables with foreign key constraint in a database, adding the ON UPDATE and ON DELETE rules and a little ordering.

Read More
SQL SERVER - Create Database Error in Windows Vista

SQL SERVER – Create Database Error in Windows Vista

May 7, 2008
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Utility, Vista

A reader on Vista got a create database error, Msg 262 CREATE DATABASE permission denied in database master. The fix is the same one from my earlier post.

Read More
Previous 1 … 530 531 532 533 534 535 536 … 589 Next
  • Books
  • Testimonials
  • Privacy Policy

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