Click here to Skip to main content
15,908,264 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,
Can you help me, plz?
Client: Win 10 and SQL 2014
Server: Win 2012 and SQL 2012

SQL
SET XACT_ABORT ON
begin distributed transaction
select top 10 * from [210_2k12].master.sys.objects
ROLLBACK


What I have tried:

Problem And Solutions: FIX: Error message when you run a distributed query in SQL Server 2005 or SQL Server 2008: "OLE DB provider 'SQLNCLI' for linked server '' returned message 'No transaction is active'"[^]
Troubleshooting MSDTC: The transaction manager has disabled its support for remote/network transactions – Justin Cooney[^]
Posted
Updated 8-Mar-17 7:23am

1 solution

There is no need to start a transaction for a simple SELECT statement. Because that query doesn't change anything in your database there is nothing to roll back. Transactions with ROLLBACK are used if you have to make one or more changes to the data in one or more tables and you have to reset these data to it's original state if one of the changes fails.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900