Blogs

Export Extended Event Results to CSV or Table

By

This is something that I’ve seen pop up a couple of times on various...

Book Review – Fundamentals of Data Engineering

By

This book was recommended by some of my colleagues, so I decided to give...

Introduction to OpenAI and LLMs – Part 2

By

My previous blog post on this topic was Introduction to OpenAI and LLMs, the...

Read the latest Blogs

Forums

Identify Tables With Dropped Columns

By Cláudio Silva

Comments posted to this topic are about the item Identify Tables With Dropped Columns

Multi-Database Marked Transactions

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Multi-Database Marked Transactions

Poor Database Design Realities

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Poor Database Design Realities

Visit the forum

Question of the Day

Multi-Database Marked Transactions

I run a marked transaction across multiple databases with this code:

BEGIN TRAN onemorenewdbTran WITH MARK 'mark from 3 dbs'
USE sandbox2
INSERT dbo.AddressTable
  (AddressID, AddressValue, AddressPostal)
VALUES
  (12, '123 three St', '4444')
GO
USE sandbox3
INSERT dbo.Logger (logdate, logmsg) VALUES (GETDATE(), 'tran message')
GO
INSERT sandbox4.dbo.logger (uid) VALUES (700)
COMMIT TRAN onemorenewdbTran
GO
How many marks are inserted into msdb.dbo.logmarkhistory?

See possible answers