为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:--03134284194-20240621-232765-20108
【操作系统】:Docker
【CPU】: 虚拟化机器
【问题描述】*:
TransactionScope 事务新增数据,分三次创建数据:
事务提交后,第一批和第二批数据能正常提交。
异常:
回滚没有异常比较难理解
--- 此处省略部分内容--
2024-08-14 17:44:51.317 (EP[0] sess:0x7f92fc141c68 thrd:85984 user:TEST_MES trxid:70831 stmt:NULL appname:) TRX: START
2024-08-14 17:44:51.317 (EP[0] sess:0x7f92fc141c68 thrd:85984 user:TEST_MES trxid:70831 stmt:0x7f92fc13e000 appname: ip:::ffff:192.168.20.11) [DDL] set schema DEV_SPAS_MANUFACTURE
2024-08-14 17:44:51.318 (EP[0] sess:0x7f92fc141c68 thrd:85984 user:TEST_MES trxid:70831 stmt:NULL appname:) TRX: COMMIT
--- 此处省略部分内容--
2024-08-14 17:44:51.556 (EP[0] sess:0x7f92fc141c68 thrd:85984 user:TEST_MES trxid:70832 stmt:0x7f92fc13f8e0 appname: ip:::ffff:192.168.20.11) MORE_RESULT
2024-08-14 17:44:53.247 (EP[0] sess:0x7f92f8012148 thrd:-1 user:NULL trxid:NULL stmt:NULL appname:) ALLOC SESSION
2024-08-14 17:44:53.251 (EP[0] sess:0x7f92f8012148 thrd:85987 user:NULL trxid:NULL stmt:NULL appname:) [LGN] FREE SESSION
2024-08-14 17:44:53.257 (EP[0] sess:0x7f9304132568 thrd:-1 user:NULL trxid:NULL stmt:NULL appname:) ALLOC SESSION
2024-08-14 17:44:53.259 (EP[0] sess:0x7f9304132568 thrd:85988 user:NULL trxid:0 stmt:NULL appname:) STARTUP
2024-08-14 17:44:53.263 (EP[0] sess:0x7f9304132568 thrd:85988 user:TEST_MES trxid:0 stmt:NULL appname:) [LGN] LOGIN
2024-08-14 17:44:53.265 (EP[0] sess:0x7f9304132568 thrd:85988 user:TEST_MES trxid:0 stmt:NULL appname:) ALLOC STMT
2024-08-14 17:44:53.266 (EP[0] sess:0x7f9304132568 thrd:85988 user:TEST_MES trxid:0 stmt:0x7f930412e900 appname: ip:::ffff:192.168.20.11) [ORA]: set schema DEV_SPAS_MANUFACTURE
2024-08-14 17:44:53.267 (EP[0] sess:0x7f9304132568 thrd:85988 user:TEST_MES trxid:70833 stmt:NULL appname:) TRX: START
--- 此处省略部分内容--
2024-08-14 17:44:53.267 (EP[0] sess:0x7f9304132568 thrd:85988 user:TEST_MES trxid:70833 stmt:NULL appname:) TRX: START
2024-08-14 17:44:53.267 (EP[0] sess:0x7f9304132568 thrd:85988 user:TEST_MES trxid:70833 stmt:0x7f930412e900 appname: ip:::ffff:192.168.20.11) [DDL] set schema DEV_SPAS_MANUFACTURE
2024-08-14 17:44:53.267 (EP[0] sess:0x7f9304132568 thrd:85988 user:TEST_MES trxid:70833 stmt:0x7f930412e900 appname: ip:::ffff:192.168.20.11) [DDL] set schema DEV_SPAS_MANUFACTURE EXECTIME: 0(ms) EXEC_ID: 96900.
2024-08-14 17:44:53.328 (EP[0] sess:0x7f9304132568 thrd:85988 user:TEST_MES trxid:70833 stmt:0x7f930412e900 appname: ip:::ffff:192.168.20.11) [ORA]: BEGIN
--- 此处省略部分内容--
2024-08-14 17:44:53.340 (EP[0] sess:0x7f9304132568 thrd:85988 user:TEST_MES trxid:70833 stmt:NULL appname:) trx[70833] alloc pseg page[0, 1087], page_lsn[20072809], n_pages[1]
2024-08-14 17:44:53.344 (EP[0] sess:0x7f9304132568 thrd:85988 user:TEST_MES trxid:70833 stmt:0x7f930412e900 appname: ip:::ffff:192.168.20.11) [CAL] BEGIN
--- 此处省略部分内容--
2024-08-14 17:44:53.483 (EP[0] sess:0x7f9304132568 thrd:85988 user:TEST_MES trxid:70833 stmt:0x7f930412e900 appname: ip:::ffff:192.168.20.11) MORE_RESULT
2024-08-14 17:44:53.496 (EP[0] sess:0x7f9304132568 thrd:85988 user:TEST_MES trxid:70833 stmt:NULL appname:) [LGN] FREE SESSION
2024-08-14 17:44:53.496 (EP[0] sess:0x7f9304132568 thrd:85988 user:TEST_MES trxid:70833 stmt:NULL appname:) TRX: ROLLBACK
2024-08-14 17:44:53.497 (EP[0] sess:0x7f9304132568 thrd:85988 user:TEST_MES trxid:70833 stmt:NULL appname:) trx[70833]: pseg_reset_last_page free pseg page (0, 1087)
2024-08-14 17:44:53.806 (EP[0] sess:0x7f9300453d58 thrd:-1 user:NULL trxid:NULL stmt:NULL appname:) ALLOC SESSION
2024-08-14 17:44:53.807 (EP[0] sess:0x7f9300453d58 thrd:85989 user:NULL trxid:NULL stmt:NULL appname:) [LGN] FREE SESSION
2024-08-14 17:44:53.811 (EP[0] sess:0x7f930c012148 thrd:-1 user:NULL trxid:NULL stmt:NULL appname:) ALLOC SESSION
2024-08-14 17:44:53.813 (EP[0] sess:0x7f930c012148 thrd:85990 user:NULL trxid:0 stmt:NULL appname:) STARTUP
2024-08-14 17:44:53.814 (EP[0] sess:0x7f930c012148 thrd:85990 user:TEST_MES trxid:0 stmt:NULL appname:) [LGN] LOGIN
2024-08-14 17:44:53.815 (EP[0] sess:0x7f930c012148 thrd:85990 user:TEST_MES trxid:0 stmt:NULL appname:) ALLOC STMT
2024-08-14 17:44:53.816 (EP[0] sess:0x7f930c012148 thrd:85990 user:TEST_MES trxid:0 stmt:0x7f930c00e4e0 appname: ip:::ffff:192.168.20.11) [ORA]: set schema DEV_SPAS_MANUFACTURE
2024-08-14 17:44:53.816 (EP[0] sess:0x7f930c012148 thrd:85990 user:TEST_MES trxid:70834 stmt:NULL appname:) TRX: START
2024-08-14 17:44:53.816 (EP[0] sess:0x7f930c012148 thrd:85990 user:TEST_MES trxid:70834 stmt:0x7f930c00e4e0 appname: ip:::ffff:192.168.20.11) [DDL] set schema DEV_SPAS_MANUFACTURE
2024-08-14 17:44:53.817 (EP[0] sess:0x7f930c012148 thrd:85990 user:TEST_MES trxid:70834 stmt:NULL appname:) TRX: COMMIT
--- 此处省略部分内容--
2024-08-14 17:44:53.955 (EP[0] sess:0x7f92fc141c68 thrd:85984 user:TEST_MES trxid:70832 stmt:NULL appname:) MSG: COMMIT
2024-08-14 17:44:53.955 (EP[0] sess:0x7f92fc141c68 thrd:85984 user:TEST_MES trxid:70832 stmt:NULL appname:) TRX: COMMIT
2024-08-14 17:44:53.955 (EP[0] sess:0x7f92fc141c68 thrd:85984 user:TEST_MES trxid:70832 stmt:NULL appname:) trx[70832]: pseg_page_free_for_insert_only_trx free pseg page (0, 1055), page_lsn = 20073340
实例代码:
using (var transcation = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
{
// 1. 创建 order 数据
// 2. 批量创建 order detail (列表)
// 3. 批量创建 order 其他数据 (列表)
transcation.Complete();
}
你的版本看着是临时版,请找当地商务或者在官网下载正式版
