As part of a transaction I’m modifying rows in tables via a server link, so have to specify “SET XACT_ABORT ON” in my sproc otherwise it won’t execute. Now I’m noticing that SCOPE_IDENTITY() is returning NULL, which is presumably something to do with the distributed transaction scope?
Does anyone know why and how to resolve?
From @@IDENTITY:
And note that although it talks about IDENT_CURRENT and SCOPE_IDENTITY in surrounding paragraphs, they make no appearance in this paragraph; i.e. none of them will work to retrieve identity values from remote servers.