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
A heavy sled hauled almost to the top of a snowy slope, its red rope trailing back down

Before You KILL a Session: Estimating the Rollback Cost

February 4, 2021
Pinal Dave
SQL Tips and Tricks
DBA, SQL Lock, SQL Server, SQL Transactions

Before you KILL a session, inspect its transaction age, log bytes, current command, and likely rollback work, then monitor the undo safely.

Read More
Gouache painting of a wooden cabinet with a reddish-brown sliding door half closed over shelves of bowls and plates, with a small vermilion dot on the door

Hide Procedure Code in SSMS: What WITH ENCRYPTION Covers

February 2, 2021
Pinal Dave
SQL Tips and Tricks
SQL Server Encryption, SQL Server Management Studio, SQL Server Security, SQL Stored Procedure

To hide procedure code, create the procedure WITH ENCRYPTION. A demo shows what the clause blocks: the text, the definition and the plan. It also shows the ALTER trap that unhides a procedure, and why this is obfuscation and not security.

Read More
Gouache painting of a sorter board with round beads and a rejected square vermilion block

Digits in a Column: A CHECK Constraint for Digits Only

February 1, 2021
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Scripts, SQL Server, SQL String

To keep only digits in a column, a CHECK constraint with NOT LIKE and a character range works, but it has two holes. It accepts an empty string and digits from other scripts. A demo closes both and shows NULL, trust and fixed length codes.

Read More
Gouache painting of a finished vermilion vase beside the empty plaster mold of its shape

ALTER SCHEMA TRANSFER: Move a Table to Another Schema

January 28, 2021
Pinal Dave
SQL Tips and Tricks
Schema, SQL Scripts, SQL Server, SQL View

ALTER SCHEMA TRANSFER moves a table to another schema and leaves repairs behind. A demo shows that permissions disappear and views break while the data stays. It also shows a synonym that keeps old queries working.

Read More
Leeks trimmed at both ends on a chopping board, roots and tough tops in two small piles.

LTRIM and RTRIM With Custom Characters in SQL Server 2022

January 26, 2021
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Server, SQL Server 2022, SQL String

Use LTRIM and RTRIM with custom characters in SQL Server 2022, understand character sets, test TRIM directions, and preserve valid text.

Read More
Gouache painting of a wall of cream and sage skeins in cubbies with one vermilion skein

Search a Query Plan for a Table: Find Node and XQuery

January 25, 2021
Pinal Dave
SQL Tips and Tricks
Execution Plan, SQL Server, SQL Server Management Studio

Search a query plan for a table with the Find Node feature in SSMS, or with XQuery over the plan XML. A demo query reads one table twice, and both methods find both visits. The post also shows how to save a plan file for later.

Read More
Transactions and Variables

Transactions and Variables – SQL in Sixty Seconds #150

January 22, 2021
Pinal Dave
SQL Tips and Tricks
SQL in Sixty Seconds, SQL Scripts, SQL Server, SQL Transactions

Transactions and Variables both are not related at all. There is no impact of a transaction on a variable. Let us learn about it today.

Read More
Previous 1 … 37 38 39 40 41 42 43 … 570 Next
  • Books
  • Testimonials
  • Privacy Policy

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