下面的代码中抛出了一个异常:
Imports System.Transactions
Imports System.Data.SqlClient
Public Class _Default
Inherits System.Web.UI.Page
Public Sub Test()
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
Using scope As
我试图通过pymssql从python脚本执行一个存储过程,该脚本与链接服务器进行通信。当手动运行时,SP可以工作,但是当从python脚本运行时,会出现以下错误:
(7391, 'The operation could not be performed because OLE DB
provider"SQLNCLI11" for linked server "DBLOG" was unable to begin a
distributed transaction.DB-Lib error message 20018, severity 16:
\n
我在Server上得到了这个奇怪的错误。我在旧的帖子里找不到解决办法。
我有这样的程序:
create proc _upJM_SyncAll_test
as
begin
DECLARE @SQLString nvarchar(max)
set @SQLString = N'
DELETE FROM OPENQUERY([LOCAL_MYSQL],''SELECT acSubject FROM _utjm_setitemprices'') where acSubject not in (select acSubject from _uvJM_Se
我有一个在不同环境中运行的简单WCF服务。今天,我尝试在我的Windows 7工作站上运行它,并在我的客户机上获得了这个错误(这是用于测试的简单控制台应用程序):
System.ServiceModel.ProtocolException:传入的事务不能反序列化。消息中的事务头要么格式错误,要么以无法识别的格式出现。客户端和服务必须配置为使用相同的协议和协议版本。发生了以下异常:与基础事务管理器的通信失败。
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood
我在配置Biztalk 2016组时面临一个问题
2017-01-06 16:25:27:0170错误BtsCfg服务器尚未配置。若要配置服务器,请运行BizTalk服务器配置向导并配置组功能。2017-01-06 16:25:27:0186 Info BtsCfg实例化IBTSMsgBoxPerformance对象2017-01-06 16:25:27:0186 Info BtsCfg调用IBTSMsgBoxPerformance::卸载perf计数器实例时CounterManager.UninstallArtifacts中的卸载工艺品异常。异常详细信息是:异常源:系统消息:无法删除性能类别
我有一个链接服务器(SQLServer14.0.1000.169)。本地服务器(SQLServer10.0.1600)在短时间内将数据(大约每分钟1行)接收到Table46中。我需要将这个新行的一些信息传递给链接服务器,因此我在本地服务器中为此创建了一个触发器:
CREATE TRIGGER New_Event
ON dbo.Table46 FOR INSERT AS
BEGIN
SET NOCOUNT ON;
INSERT INTO [LinkedServer].[Database].[dbo].[TableEvents]
SELECT i.[046_ID
我使用的EF 6与UoW模式。我在UoW中定义了多个上下文,因为我使用的是来自多个数据库的数据。除了我定义的CommitAsync函数之外,一切似乎都正常工作。下面是我的代码:
public async Task CommitAsync()
{
try
{
using (var scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
{
if (_context1 != null)
是否可以在实例和Azure SQL数据库之间进行事务处理。
我有以下测试案例。
public class TransactionsTest
{
[Fact]
public void Test1()
{
var premisesDatabaseContext = new OnPremisesDatabaseContext();
var azureSQLDatabaseContext = new AzureSQLDatabaseContext();
using (TransactionScope scope = new Tr
我正在调用rest full服务,该服务将在sql server数据库中执行批量插入。当rest服务器和数据库服务器在同一台机器上时,一切正常,但如果是远程数据库服务器,则会导致以下异常。
System.InvalidOperationException: The transaction associated with the current
connection has completed but has not been disposed.
The transaction must be disposed before the connection can be used to
exec
我们注意到DTC服务停止正常工作。来自ASP.NET应用程序的日志:
System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at System.Transactions.Oletx.IDtcProxyShimFactory.ConnectToProxy(String nodeName, Guid resourceManagerIdentifier, IntPtr managedIdentifier, Boolean& n
我正在进行一个项目,在这个项目中,我有多个存储库,可以从不同的表中获取数据。我的所有存储库都是独立的,它们创建新的dataContext,将行添加到表中,并应用提交更改命令。现在,如果在我的服务中,有一种情况,我必须将数据插入多个表,但它应该发生在一个事务中。我可以使用TrnasctionScope实现这一点,但这需要相同的dataContext。由于我使用StrucutreMap创建对象,因此无法获得相同的数据上下文,因此事务失败。
我的对象是这样的。
interface IConnection
{
MyDataContext GetContext();
}
public class C
我设置了一个WCF-WSHttp发送端口,并选中了启用事务,当发送消息时,我收到以下错误:
The header 'CoordinationContext' from the namespace 'http://schemas.xmlsoap.org/ws/2004/10/wscoor' was not understood by the recipient of this message, causing the message to not be processed. This error typically indicates that the send
我有类似于以下代码的函数:
using(var db = new MyDbContext())
{
//a whole bunch of code, db is working.
//then I try opening another DbContext like so
using(var dba = new AnotherDbContext())
{
//about 2 lines of code just to get something from a database
}
}
然后,当我到达第二个DbContext时,我会得到两
当我尝试在具有两个链接服务器的本地SQL Server上触发SP时,出现有趣的错误。 上述异常处理的目的是将数据从一个链接服务器移动到另一个链接服务器。 当我从SSMS触发存储过程时,它就像一个魔咒,但是当我从Python触发它时,我得到了这些有趣的错误消息: (
'42000', '[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The OLE DB provider "SQLNCLI11" for linked server "XXXX" reported