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
Sep1

What Lock Escalation Is and How to Stop It

Pinal Dave
SQL Performance
Best Practices, SQL Index, SQL Performance, SQL Server
48 Comments

Understand lock escalation, confirm it with evidence, and reduce its impact through smaller transactions, better access paths, and modern locking.

Continue Reading
Sep1

XML Element Names in SQL Server: Row, Root and Text With FOR XML PATH

Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL String, SQL XML
No Comments

XML element names in SQL Server come from your query, and FOR XML PATH lets you choose them. This post sets the row and root names, turns a column into an attribute, writes text inside an element and shows the error you get when an attribute column comes too late. Every result comes from SQL Server 2025.

Continue Reading
Aug31

FOR XML AUTO in SQL Server: Nest Joined Rows and Name the Root

Pinal Dave
SQL Tips and Tricks
SQL Joins, SQL Scripts, SQL Server, SQL XML
2 Comments

FOR XML AUTO turns a join into nested XML, with one element per table. This post shows where the element names come from, why row order decides the grouping, how ROOT adds a single root, and how the order of your columns flips the nesting. Every result comes from SQL Server 2025.

Continue Reading
Aug30

FOR XML RAW in SQL Server: Row Names, ROOT, ELEMENTS and NULLs

Pinal Dave
SQL Tips and Tricks
SQL NULL, SQL Scripts, SQL Server, SQL XML
2 Comments

FOR XML RAW turns each row of a query into an XML element. This post names the row element, adds a ROOT, switches to ELEMENTS and shows how a NULL value drops out of the output until XSINIL puts it back. Every result comes from SQL Server 2025.

Continue Reading
Aug29

EXECUTE AS OWNER in Stored Procedures: Power and Pitfalls

Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Server Security
No Comments

A procedure with owner rights can write to tables its caller cannot touch. Watch the identity change, and see how one careless parameter hands out too much.

Continue Reading
Aug29

What Is XML in SQL Server: Tags, Attributes and Well-Formed Rules

Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Scripts, SQL Server, SQL XML
3 Comments

What is XML in SQL Server? It’s plain text where every value carries its own label. This post turns four plant rows into XML with FOR XML RAW, names the parts of a document, and shows the errors SQL Server returns when a rule is broken.

Continue Reading
Aug28

TRY CATCH Block in SQL Server: Plan A, Plan B and the Rollback

Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server, SQL Transactions
2 Comments

A TRY CATCH block runs Plan A and falls back to Plan B when Plan A raises an error. This post shows that CATCH runs only after an error, that severity 11 is the line between a message and an error, and that one ROLLBACK undoes a nested transaction completely. Every result comes from SQL Server 2025.

Continue Reading
Previous 1 … 580 581 582 583 584 585 586 … 847 Next

SQL Server slow? Let's fix it together in about four hours.

Pinal Dave

In my Comprehensive Database Performance Health Check, you share your screen, I guide you, and we fix your biggest performance troublemakers. No passwords. No remote access.

You keep every script, and the know-how to fix it yourself next time.

Want your whole team to learn it?

My Practical Workshop has no PowerPoint, just live demos. My AI Enablement Workshop shows your team where AI saves hours, and where it quietly costs them.

Over 400 customers have worked with me this way, and not one shared a password. See all consulting options.


Who We Are

Pinal Dave is an SQL Server Performance Tuning Expert and independent consultant with over 24 years of hands-on experience. He holds a Masters of Science degree and numerous database certifications.

Pinal has authored 19 books and 125 Pluralsight courses. To freely share his knowledge and help others build their expertise, Pinal has also written more than 5,800 database tech articles on his blog at https://blog.sqlauthority.com.

Pinal is also a CrossFit Level 1 Trainer (CF-L1) and CrossFit Level 2 Trainer (CF-L2).


Nupur Dave is a social media enthusiast and an independent consultant. She primarily focuses on the database domain, helping clients build short and long-term multi-channel campaigns to drive leads for their sales pipeline.


Shaivi Pinalkumar Dave is a book author and a women’s artistic gymnast.

  • Books
  • Testimonials
  • Privacy Policy

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