Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 736245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:34:57+00:00 2026-05-14T07:34:57+00:00

As part of a transaction I’m modifying rows in tables via a server link,

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T07:34:58+00:00Added an answer on May 14, 2026 at 7:34 am

    From @@IDENTITY:

    The scope of the @@IDENTITY function
    is current session on the local server
    on which it is executed. This function
    cannot be applied to remote or linked
    servers. To obtain an identity value
    on a different server, execute a
    stored procedure on that remote or
    linked server and have that stored
    procedure (which is executing in the
    context of the remote or linked
    server) gather the identity value and
    return it to the calling connection on
    the local server.

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF service being called as part of a transaction. If the
Is the else part of orElse called when a transaction is retried due to
I have used this guid: http://www.c-sharpcorner.com/uploadfile/shivprasadk/wcf-faq-part-5-transactions/ Why doesnt it rollback?? I dont understand! I
[Part 1 - Original question] I have values like 30, 31, 28 or 29
I need to update millions of rows as part of my next release, but
I have a parent object (part of a DAL) that contains, amongst other things,
I have a set of legacy unit tests, most of which are Spring AbstractTransactionalJUnit4SpringContextTests
I have a table that contains records that can become part of a bill.
I have a Transactions object (as a part of a shopping cart) that belongs_to
I have a Trans (transaction) class in my application that submits a transaction to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.