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 - Effect of TRANSACTION on Local Variable - After ROLLBACK and After COMMIT

SQL SERVER – Effect of TRANSACTION on Local Variable – After ROLLBACK and After COMMIT

September 25, 2007
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Transactions

What is the effect of a TRANSACTION on local variable values after ROLLBACK and after COMMIT? A short example I wrote for a Jr. Developer shows the answer.

Read More
A striped hand-knitted scarf on a chair, no color repeated, with two unused balls of yarn in a basket on the seat.

A Quote of the Day From a Table, With No Repeats Until All Are Used

May 23, 2007
Pinal Dave
SQL Tips and Tricks
SQL Random, SQL Scripts, SQL Server, SQL Transactions

Build a quote of the day table that rotates without repeats, handles concurrent requests, and supports a stable date-based selection.

Read More
A swinging trapeze in an empty circus tent above a safety net holding one red ball

Replacing @@ERROR Checks With TRY CATCH in Old Procedures

May 20, 2007
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Error Messages, SQL Server, SQL Stored Procedure, SQL Transactions

Replace fragile @@ERROR checks with TRY CATCH, transaction state checks, and THROW while preserving clear failure information for callers.

Read More
A tidy line of wooden artist mannequins where only the last one has a red bucket stuck on its head

Last Line of a SQL Script: The Joke Every DBA Has Lived

May 14, 2007
Pinal Dave
SQL Tips and Tricks
SQL Humor, SQL Scripts, SQL Server Management Studio, SQL Transactions

The last line of a SQL script decides whether your work is saved, rolled back, or still holding locks. Here are the classic endings and how to check them.

Read More
SQL SERVER - Fix : Error: 3902, Severity: 16; State: 1 : The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.

SQL SERVER – Fix : Error: 3902, Severity: 16; State: 1 : The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.

April 12, 2007
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server Security, SQL Transactions

An SSIS package fails with Error 3902: the COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION. Two fixes, one is RetainSameConnection set to true.

Read More
Previous 1 … 12 13 14 15
  • Books
  • Testimonials
  • Privacy Policy

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