分布式查询和分布式事务
Microsoft® SQL Server™ 允许创建与称为链接服务器的 OLE DB 数据源的链接。在链接到 OLE DB 数据源之后,可以:
从 OLE DB 数据源引用行集,作为 Transact-SQL 语句中的表。
将命令传递给 OLE DB 数据源,并包含结果行集,作为 Transact-SQL 语句中的表。
每个分布式查询都可以引用多个链接的服务器,而且可以对每个链接的服务器分别执行更新或读取操作。单个分布式查询可以对某些链接的服务器执行读取操作,并且对其它链接的服务器执行更新操作。通常情况下,每当某个事务可能更新多个链接服务器中的数据时,Microsoft SQL Server 都要求相应的 OLE DB 提供程序支持分布式事务。因此,链接服务器上所支持的查询类型取决于 OLE DB 提供程序中对事务的支持级别。OLE DB 为事务管理定义了两个可选的接口:
ITransactionLocal 支持 OLE DB 数据源中的本地事务。
ITransactionJoin 允许提供程序联结包含其它资源管理器的分布式事务。
所有支持 ITransactionJoin 的提供程序也都支持 ITransactionLocal。
如果在连接是自动提交模式时执行分布式查询,则应用以下规则:
对于不支持 ItransactionLocal 的提供程序,只允许执行读取操作。
对于支持 ITransactionLocal 的提供程序,允许执行所有更新操作。
主控 SQL Server 会自动调用每个参与更新操作的链接的服务器中的 ITransactionLocal,以启动本地事务,并在语句执行成功时提交或在语句执行失败时回滚。
如果分布式查询是针对分布式分区视图或者是在连接为显式或隐性事务时执行,则应用下列规则:
对于不支持 ITransactionJoin 的提供程序,只允许执行读取操作。不支持任何事务或只支持 ITransactionLocal 的提供程序不能参与更新操作。
如果 SET XACT_ABORT 设置为 ON,则对于支持 ITransactionJoin 的任意提供程序都允许执行所有的更新操作。主控 SQL Server 会自动调用每个参与更新操作的链接服务器中的 ITransactionJoin,以便在分布式事务中登记该服务器。然后当主控服务器表示要提交或回滚事务时,MS DTC 将提交或者回滚。
如果 SET XACT_ABORT 设置为 OFF,则链接服务器还必须支持嵌套事务,才能对其执行更新操作。当会话已经有一个现有事务时,如果提供程序支持调用 ITransactionLocal::StartTransaction,则支持嵌套事务。这使 SQL Server 得以回滚分布式查询中的单个语句,而不是回滚整个事务。
上述规则意味着提供程序的下列限制不支持嵌套事务:仅在 XACT_ABORT 选项设置为 ON 时,分布式事务中才允许更新操作。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

HQL and SQL are compared in the Hibernate framework: HQL (1. Object-oriented syntax, 2. Database-independent queries, 3. Type safety), while SQL directly operates the database (1. Database-independent standards, 2. Complex executable queries and data manipulation).

Recently, many users have been asking the editor, how to download links starting with 115://? If you want to download links starting with 115://, you need to use the 115 browser. After you download the 115 browser, let's take a look at the download tutorial compiled by the editor below. Introduction to how to download links starting with 115:// 1. Log in to 115.com, download and install the 115 browser. 2. Enter: chrome://extensions/ in the 115 browser address bar, enter the extension center, search for Tampermonkey, and install the corresponding plug-in. 3. Enter in the address bar of 115 browser: Grease Monkey Script: https://greasyfork.org/en/

As part of the WeChat ecosystem, WeChat video accounts have gradually become an important promotion tool for content creators and merchants. Getting links to video accounts on this platform is crucial for sharing and disseminating content. The following will introduce in detail how to obtain the WeChat video account link and how to add product links to the video account to improve the dissemination effect of the content. 1. How to get the WeChat video account link? After posting a video on your WeChat video account, the system will automatically create a video link. Authors can copy the link after publishing to facilitate sharing and dissemination. After logging in to your WeChat video account, you can browse the homepage of your video account. On the home page, each video is accompanied by a corresponding link so you can copy or share it directly. 3. Search video account: Enter the video account name in the WeChat search box

Download the latest version of 12306 ticket booking app. It is a travel ticket purchasing software that everyone is very satisfied with. It is very convenient to go wherever you want. There are many ticket sources provided in the software. You only need to pass real-name authentication to purchase tickets online. All users You can easily buy travel tickets and air tickets and enjoy different discounts. You can also start booking reservations in advance to grab tickets. You can book hotels or special car transfers. With it, you can go where you want to go and buy tickets with one click. Traveling is simpler and more convenient, making everyone's travel experience more comfortable. Now the editor details it online Provides 12306 users with a way to view historical ticket purchase records. 1. Open Railway 12306, click My in the lower right corner, and click My Order 2. Click Paid on the order page. 3. On the paid page

How to check my academic qualifications on Xuexin.com? You can check your academic qualifications on Xuexin.com, but many users don’t know how to check their academic qualifications on Xuexin.com. Next, the editor brings you a graphic tutorial on how to check your academic qualifications on Xuexin.com. Interested users come and take a look! Xuexin.com usage tutorial: How to check your academic qualifications on Xuexin.com 1. Xuexin.com entrance: https://www.chsi.com.cn/ 2. Website query: Step 1: Click on the Xuexin.com address above to enter the homepage Click [Education Query]; Step 2: On the latest webpage, click [Query] as shown by the arrow in the figure below; Step 3: Then click [Login Academic Credit File] on the new page; Step 4: On the login page Enter the information and click [Login];

The role of a DHCP relay is to forward received DHCP packets to another DHCP server on the network, even if the two servers are on different subnets. By using a DHCP relay, you can deploy a centralized DHCP server in the network center and use it to dynamically assign IP addresses to all network subnets/VLANs. Dnsmasq is a commonly used DNS and DHCP protocol server that can be configured as a DHCP relay server to help manage dynamic host configurations in the network. In this article, we will show you how to configure dnsmasq as a DHCP relay server. Content Topics: Network Topology Configuring Static IP Addresses on a DHCP Relay D on a Centralized DHCP Server

What should I do if I can’t enter the game when the epic server is offline? This problem must have been encountered by many friends. When this prompt appears, the genuine game cannot be started. This problem is usually caused by interference from the network and security software. So how should it be solved? The editor of this issue will explain I would like to share the solution with you, I hope today’s software tutorial can help you solve the problem. What to do if the epic server cannot enter the game when it is offline: 1. It may be interfered by security software. Close the game platform and security software and then restart. 2. The second is that the network fluctuates too much. Try restarting the router to see if it works. If the conditions are OK, you can try to use the 5g mobile network to operate. 3. Then there may be more

Title: Realme Phone Beginner’s Guide: How to Create Folders on Realme Phone? In today's society, mobile phones have become an indispensable tool in people's lives. As a popular smartphone brand, Realme Phone is loved by users for its simple and practical operating system. In the process of using Realme phones, many people may encounter situations where they need to organize files and applications on their phones, and creating folders is an effective way. This article will introduce how to create folders on Realme phones to help users better manage their phone content. No.
