【发布时间】:2017-07-13 19:51:47
【问题描述】:
在包含大量数据的 Azure SQL 数据库上执行删除语句时遇到问题。
我在 Azure SQL 数据库上有一个包含约 500 万条记录的销售表。
当我执行存储过程以删除该表中的所有数据时,它会执行一段时间,然后使用新 id 生成一个新进程,并且现有进程开始回滚,并且在新进程启动时回滚后删除数据然后新进程再次生成另一个进程并开始回滚,并且相同的重复永远持续。
最后,几个小时后,存储过程失败,数据没有被删除。
我拥有 100DTU 的 Azure SQL 数据库。
有人知道会发生什么吗?
【问题讨论】:
-
你能详细说明这部分
it executes for some time and then a new process is generated with new id and this the existing process starts to roll back and after the rollback when new process starts deleting the data then the new process again generates another process and start rollback and this same repetition continues forever具体是什么意思吗...在此过程中您是否遇到任何错误...为什么在删除整个表时不能截断?