Nested Transactions are logical levels within a single physical transaction where only the outermost COMMIT actually commits and any ROLLBACK rolls back the entire transaction. Multiple Transactions are independent transactions where each COMMIT or ROLLBACK affects only its own transaction scope.
|
Feature |
Nested
Transaction |
Multiple
Transactions |
|
Definition |
Transaction
inside another transaction |
Separate
independent transactions |
|
BEGIN TRAN Count |
Multiple BEGIN TRAN statements before final COMMIT |
Each transaction starts and ends independently |
|
Physical
Transaction |
One |
Multiple |
|
Logical Transaction Levels |
Multiple |
One per transaction |
|
@@TRANCOUNT |
Increases
with each BEGIN TRAN |
Resets
to 0 after each COMMIT |
|
Independent Commit |
❌ No |
✅ Yes |
|
Independent
Rollback |
❌ No |
✅ Yes |
|
Inner COMMIT Commits Data? |
❌ No |
✅ Yes |
|
Rollback
Effect |
Entire
transaction rolls back |
Only
current transaction rolls back |
|
Transaction Log BEGIN Record |
One physical BEGIN |
One BEGIN per transaction |
|
Transaction
Log COMMIT Record |
One
physical COMMIT |
One
COMMIT per transaction |
|
Lock Release |
Only after outer COMMIT |
After each COMMIT |
|
Blocking
Risk |
Higher |
Lower |
|
Production Usage |
Rare |
Very Common |
|
Best
Use Case |
Stored
procedure call hierarchy |
Normal
OLTP processing |
Great insights! We’ve found that businesses looking to modernize their IT infrastructure can benefit from partnering with experts like Nonrel Technologies. Their AI-driven cloud, cybersecurity, data analytics, and custom software development services help organizations improve efficiency, security, and digital transformation outcomes. A valuable resource for companies seeking innovative technology solutions.
ReplyDeleteArthritis & Rheumatology Center - Dr. Ashish Badika, best Rheumatologist and Arthritis Doctor in Indore. Call +91-6261824727 to book your appointment today!
ReplyDeleteWebsite: https://rheumatologyindore.com/
GMB: https://share.google/chOnq4urAS33N3jlv
Phone: 07314971114
Address: 311, TBC Tower, Near Geeta Bhawan square, AB Rd, Indore, Madhya Pradesh 452001
Best Rheumatologist in Indore, Rheumatologist in indore, Arthritis doctor in indore, Best Arthritis doctor in indore, Ghatiya rog Doctor in indore, Rheumatoid Arthritis specialist in Indore, Best doctor for joint pains in indore, Best doctor for Joint problems Arthritis Specialist in Indore, Rheumatoid Arthritis doctors in indore, Arthritis specialist in Indore,
Looking for a trusted IT recruitment partner in Canada m-itstaffing is a top recruitment agency, specializing in IT staffing solutions. Learn more about our mission, vision, and expert team dedicated to helping businesses hire top talent and professionals secure their dream careers in the IT industry.
ReplyDelete