我有一个表,每天都会删除并创建一个索引,并且我还有另一项工作是使用ACCESS
锁查询该表。
有时这些作业同时发生,然后出现以下错误:
2641 %DBID.%TVMID was restructured. Resubmit.
我在文档中阅读了以下内容:
Explanation:
A table was changed before a statement that references the table was processed.
(For example, an index may have been added or a field removed.)
Notes:
The statement may not have the intended result because of the change in the table.
Remedy:
Examine the table and resubmit the request.
https://docs.teradata.com/reader/8MhLDQBmL52OycrEKPuGqg/Ju5pqm9uRFO6VziQdcmA6w
我猜这是因为CREATE INDEX
语句请求EXCLUSIVE
锁定,并且SELECT
语句在创建索引时排队,但是在从SELECT
弹出时该表的队列具有不同的版本号,并且失败。
也许我完全错了,但是,
无论如何有避免这种行为?
使SELECT
句子在有机会被执行时重新评估的方式。
谢谢!
答案 0 :(得分:1)
由应用程序来处理2641并重新提交请求。没有使数据库自动执行操作的选项。